From: Linus Torvalds Date: Tue, 16 Jun 2009 22:31:25 +0000 (-0700) Subject: readahead: clean up and simplify the code for filemap page fault readahead X-Git-Tag: v2.6.31-rc1~299^2~171 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef00e08e26dd5d84271ef706262506b82195e752;p=pandora-kernel.git readahead: clean up and simplify the code for filemap page fault readahead This shouldn't really change behavior all that much, but the single rather complex function with read-ahead inside a loop etc is broken up into more manageable pieces. The behaviour is also less subtle, with the read-ahead being done up-front rather than inside some subtle loop and thus avoiding the now unnecessary extra state variables (ie "did_readaround" is gone). Fengguang: the code split in fact fixed a bug reported by Pavel Levshin: the PGMAJFAULT accounting used to be bypassed when MADV_RANDOM is set, in which case the original code will directly jump to no_cached_page reading. Cc: Pavel Levshin Cc: Cc: Nick Piggin Signed-off-by: Wu Fengguang Signed-off-by: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed