mm/readahead: pass a file_ra_state into force_page_cache_ra
authorDavid Howells <dhowells@redhat.com>
Fri, 16 Oct 2020 03:06:35 +0000 (20:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Oct 2020 18:11:16 +0000 (11:11 -0700)
commitb1647dc0deef6e923e30c46f28bf5679125c9a10
tree53734204747a75887253093b6784f8f662c32cef
parentdb660d462525c4a152b25e033c3dfa9c25d188e6
mm/readahead: pass a file_ra_state into force_page_cache_ra

The file_ra_state being passed into page_cache_sync_readahead() was being
ignored in favour of using the one embedded in the struct file.  The only
caller for which this makes a difference is the fsverity code if the file
has been marked as POSIX_FADV_RANDOM, but it's confusing and worth fixing.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Biggers <ebiggers@google.com>
Link: https://lkml.kernel.org/r/20200903140844.14194-10-willy@infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/internal.h
mm/readahead.c