]> git.baikalelectronics.ru Git - kernel.git/commit
mm/filemap: fix readahead return types
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 15 May 2021 00:27:30 +0000 (17:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 May 2021 02:41:32 +0000 (19:41 -0700)
commit208297e673d87ab0afb78bd03726e1577df7e903
treefdf94ce8efe2e7f9e9ba74a2ad5aec2347ea0133
parentc6f0f1139e34b9fcc8c7394ee1b80aa06de65219
mm/filemap: fix readahead return types

A readahead request will not allocate more memory than can be represented
by a size_t, even on systems that have HIGHMEM available.  Change the
length functions from returning an loff_t to a size_t.

Link: https://lkml.kernel.org/r/20210510201201.1558972-1-willy@infradead.org
Fixes: 3d3ec059b9ccb4 ("btrfs: add and use readahead_batch_length")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/iomap/buffered-io.c
include/linux/pagemap.h