projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9d4fcf
)
zlc_setup(): handle jiffies wraparound
author
KOSAKI Motohiro
<
[email protected]
>
Tue, 4 Mar 2008 22:28:32 +0000
(14:28 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 5 Mar 2008 00:35:10 +0000
(16:35 -0800)
jiffies subtraction may cause an overflow problem. It should be using
time_after().
[
[email protected]
: include jiffies.h]
Signed-off-by: KOSAKI Motohiro <
[email protected]
>
Cc: Lee Schermerhorn <
[email protected]
>
Cc: Paul Jackson <
[email protected]
>
Cc: Mel Gorman <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/page_alloc.c
patch
|
blob
|
history
diff --git
a/mm/page_alloc.c
b/mm/page_alloc.c
index 8896e874a67dae2c558034dbbf27491b231c2b2a..e76cf94725c9dcb9851d091434fac30888265c53 100644
(file)
--- a/
mm/page_alloc.c
+++ b/
mm/page_alloc.c
@@
-19,6
+19,7
@@
#include <linux/swap.h>
#include <linux/interrupt.h>
#include <linux/pagemap.h>
+#include <linux/jiffies.h>
#include <linux/bootmem.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
@@
-1276,7
+1277,7
@@
static nodemask_t *zlc_setup(struct zonelist *zonelist, int alloc_flags)
if (!zlc)
return NULL;
- if (
jiffies - zlc->last_full_zap > 1 * HZ
) {
+ if (
time_after(jiffies, zlc->last_full_zap + HZ)
) {
bitmap_zero(zlc->fullzones, MAX_ZONES_PER_ZONELIST);
zlc->last_full_zap = jiffies;
}