Skip to content
Commit 20ff1c95 authored by Gao Xiang's avatar Gao Xiang Committed by Linus Torvalds
Browse files

mm/readahead.c: simplify get_next_ra_size()

It's a trivial simplification for get_next_ra_size() and clear enough for
humans to understand.

It also fixes potential overflow if ra->size(< ra_pages) is too large.

Link: http://lkml.kernel.org/r/1540707206-19649-1-git-send-email-hsiangkao@aol.com


Signed-off-by: default avatarGao Xiang <hsiangkao@aol.com>
Reviewed-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Reviewed-by: default avatarMatthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 368686a9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment