aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4_fs.h
diff options
context:
space:
mode:
authorJohannes Weiner2011-01-20 14:44:21 -0800
committerLinus Torvalds2011-01-20 17:02:05 -0800
commit82478fb7bca28e3ca2f3c55c14e690f749dd4dbb (patch)
tree71023f480667dc3bfd255673437c76db77a05aa0 /fs/nfs/nfs4_fs.h
parent3305de51bf612603c9a4e4dc98ceb839ef933749 (diff)
mm: compaction: prevent division-by-zero during user-requested compaction
Up until 3e7d344 ("mm: vmscan: reclaim order-0 and use compaction instead of lumpy reclaim"), compaction skipped calculating the fragmentation index of a zone when compaction was explicitely requested through the procfs knob. However, when compaction_suitable was introduced, it did not come with an extra check for order == -1, set on explicit compaction requests, and passed this order on to the fragmentation index calculation, where it overshifts the number of requested pages, leading to a division by zero. This patch makes sure that order == -1 is recognized as the flag it is rather than passing it along as valid order parameter. [akpm@linux-foundation.org: add comment, per Mel] Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
0 files changed, 0 insertions, 0 deletions