]> git.baikalelectronics.ru Git - kernel.git/commit
mm/readahead.c: simplify get_next_ra_size()
authorGao Xiang <hsiangkao@aol.com>
Fri, 28 Dec 2018 08:33:34 +0000 (00:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Dec 2018 20:11:46 +0000 (12:11 -0800)
commitc576b470ab1fbbaf66a94db133925730a1acab4b
tree917edac99a1ab31b2f643c796330315981f30480
parent4efe01e3d66b0c15125ddd3c750cbbc83c6cf673
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: Gao Xiang <hsiangkao@aol.com>
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/readahead.c