diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2008-07-25 04:45:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:28 -0400 |
commit | 2b4bc46052ea8cd7c370b67ca0b9c26586f1439a (patch) | |
tree | 7ea589780fa4f579e2d678bbf4c2655c57cfadbb /mm | |
parent | b69c49b78457f681ecfb3147bd968434ee6559c1 (diff) |
pdflush: use time_after() instead of open-coding it
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/pdflush.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/pdflush.c b/mm/pdflush.c index 9d834aa4b979..0cbe0c60c6bf 100644 --- a/mm/pdflush.c +++ b/mm/pdflush.c | |||
@@ -130,7 +130,7 @@ static int __pdflush(struct pdflush_work *my_work) | |||
130 | * Thread creation: For how long have there been zero | 130 | * Thread creation: For how long have there been zero |
131 | * available threads? | 131 | * available threads? |
132 | */ | 132 | */ |
133 | if (jiffies - last_empty_jifs > 1 * HZ) { | 133 | if (time_after(jiffies, last_empty_jifs + 1 * HZ)) { |
134 | /* unlocked list_empty() test is OK here */ | 134 | /* unlocked list_empty() test is OK here */ |
135 | if (list_empty(&pdflush_list)) { | 135 | if (list_empty(&pdflush_list)) { |
136 | /* unlocked test is OK here */ | 136 | /* unlocked test is OK here */ |
@@ -151,7 +151,7 @@ static int __pdflush(struct pdflush_work *my_work) | |||
151 | if (nr_pdflush_threads <= MIN_PDFLUSH_THREADS) | 151 | if (nr_pdflush_threads <= MIN_PDFLUSH_THREADS) |
152 | continue; | 152 | continue; |
153 | pdf = list_entry(pdflush_list.prev, struct pdflush_work, list); | 153 | pdf = list_entry(pdflush_list.prev, struct pdflush_work, list); |
154 | if (jiffies - pdf->when_i_went_to_sleep > 1 * HZ) { | 154 | if (time_after(jiffies, pdf->when_i_went_to_sleep + 1 * HZ)) { |
155 | /* Limit exit rate */ | 155 | /* Limit exit rate */ |
156 | pdf->when_i_went_to_sleep = jiffies; | 156 | pdf->when_i_went_to_sleep = jiffies; |
157 | break; /* exeunt */ | 157 | break; /* exeunt */ |