diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2009-09-21 20:02:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:35 -0400 |
commit | b7c46d151cb82856a429709d1227ba1648028232 (patch) | |
tree | b93012b4bb2ffd603c020b38d8f1f6f3b4714ff7 /mm/vmscan.c | |
parent | bba78819548a59a52e60f0b259997bbd011164ae (diff) |
mm: drop unneeded double negations
Remove double negations where the operand is already boolean.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index e219b47fc50b..cad5d528a6f0 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -971,7 +971,7 @@ static unsigned long isolate_pages_global(unsigned long nr, | |||
971 | if (file) | 971 | if (file) |
972 | lru += LRU_FILE; | 972 | lru += LRU_FILE; |
973 | return isolate_lru_pages(nr, &z->lru[lru].list, dst, scanned, order, | 973 | return isolate_lru_pages(nr, &z->lru[lru].list, dst, scanned, order, |
974 | mode, !!file); | 974 | mode, file); |
975 | } | 975 | } |
976 | 976 | ||
977 | /* | 977 | /* |
@@ -1209,7 +1209,7 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, | |||
1209 | lru = page_lru(page); | 1209 | lru = page_lru(page); |
1210 | add_page_to_lru_list(zone, page, lru); | 1210 | add_page_to_lru_list(zone, page, lru); |
1211 | if (is_active_lru(lru)) { | 1211 | if (is_active_lru(lru)) { |
1212 | int file = !!is_file_lru(lru); | 1212 | int file = is_file_lru(lru); |
1213 | reclaim_stat->recent_rotated[file]++; | 1213 | reclaim_stat->recent_rotated[file]++; |
1214 | } | 1214 | } |
1215 | if (!pagevec_add(&pvec, page)) { | 1215 | if (!pagevec_add(&pvec, page)) { |
@@ -1319,7 +1319,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
1319 | if (scanning_global_lru(sc)) { | 1319 | if (scanning_global_lru(sc)) { |
1320 | zone->pages_scanned += pgscanned; | 1320 | zone->pages_scanned += pgscanned; |
1321 | } | 1321 | } |
1322 | reclaim_stat->recent_scanned[!!file] += nr_taken; | 1322 | reclaim_stat->recent_scanned[file] += nr_taken; |
1323 | 1323 | ||
1324 | __count_zone_vm_events(PGREFILL, zone, pgscanned); | 1324 | __count_zone_vm_events(PGREFILL, zone, pgscanned); |
1325 | if (file) | 1325 | if (file) |
@@ -1372,7 +1372,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
1372 | * helps balance scan pressure between file and anonymous pages in | 1372 | * helps balance scan pressure between file and anonymous pages in |
1373 | * get_scan_ratio. | 1373 | * get_scan_ratio. |
1374 | */ | 1374 | */ |
1375 | reclaim_stat->recent_rotated[!!file] += nr_rotated; | 1375 | reclaim_stat->recent_rotated[file] += nr_rotated; |
1376 | 1376 | ||
1377 | move_active_pages_to_lru(zone, &l_active, | 1377 | move_active_pages_to_lru(zone, &l_active, |
1378 | LRU_ACTIVE + file * LRU_FILE); | 1378 | LRU_ACTIVE + file * LRU_FILE); |