filemap: add helper mapping_max_folio_size()
authorXu Yang <xu.yang_2@nxp.com>
Tue, 21 May 2024 11:49:38 +0000 (19:49 +0800)
committerChristian Brauner <brauner@kernel.org>
Fri, 24 May 2024 11:34:06 +0000 (13:34 +0200)
commit79c137454815ba5554caa8eeb4ad5c94e96e45ce
tree38fc379b500250850b6d0193cd0dc860638530a1
parent2c6b531020f0590db3b6b4950a41c692e9aa4f4a
filemap: add helper mapping_max_folio_size()

Add mapping_max_folio_size() to get the maximum folio size for this
pagecache mapping.

Fixes: 5d8edfb900d5 ("iomap: Copy larger chunks from userspace")
Cc: stable@vger.kernel.org
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240521114939.2541461-1-xu.yang_2@nxp.com
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/pagemap.h