aboutsummaryrefslogtreecommitdiff
path: root/mm/sparse-vmemmap.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2011-06-15 15:08:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-15 20:04:00 -0700
commit3957c7768e5ea02fd3345176ddd340f820e5d285 (patch)
treeb3cbefeea3ac3adea0ca9d49e140503c9e5754b6 /mm/sparse-vmemmap.c
parent5f1a19070b16c20cdc71ed0e981bfa19f8f6a4ee (diff)
mm: compaction: fix special case -1 order checks
Commit 56de7263fcf3 ("mm: compaction: direct compact when a high-order allocation fails") introduced a check for cc->order == -1 in compact_finished. We should continue compacting in that case because the request came from userspace and there is no particular order to compact for. Similar check has been added by 82478fb7 (mm: compaction: prevent division-by-zero during user-requested compaction) for compaction_suitable. The check is, however, done after zone_watermark_ok which uses order as a right hand argument for shifts. Not only watermark check is pointless if we can break out without it but it also uses 1 << -1 which is not well defined (at least from C standard). Let's move the -1 check above zone_watermark_ok. [minchan.kim@gmail.com> - caught compaction_suitable] Signed-off-by: Michal Hocko <mhocko@suse.cz> Cc: Mel Gorman <mgorman@suse.de> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hioryu@jp.fujitsu.com> Acked-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/sparse-vmemmap.c')
0 files changed, 0 insertions, 0 deletions