mm/readahead: Handle ractl nr_pages being modified
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 21 Apr 2021 17:09:23 +0000 (18:09 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 23 Apr 2021 09:14:28 +0000 (10:14 +0100)
commitf615bd5c4725fde94387d3f0f4e752b4c01a4592
tree5de569f94479cac88c607373af4382568143d128
parentc790fbf20a53e8297c97ddb1c0c9d41c060067f3
mm/readahead: Handle ractl nr_pages being modified

Filesystems are not currently permitted to modify the number of pages
in the ractl.  An upcoming patch to add readahead_expand() changes that
rule, so remove the check and resync the loop counter after every call
to the filesystem.

Tested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20210420200116.3715790-1-willy@infradead.org/
Link: https://lore.kernel.org/r/20210421170923.4005574-1-willy@infradead.org/
mm/readahead.c