buffer: handle large folios in __block_write_begin_int()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 9 Nov 2023 21:06:07 +0000 (21:06 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 Dec 2023 19:58:23 +0000 (11:58 -0800)
commitb0619401b8cdafcf32ad352a8e9a225ab0b4b10d
treefb8991557e95e291a2a24b2a2c40901e27c874cc
parent4b04646caed5449ca97b909bbadca0a7a2762159
buffer: handle large folios in __block_write_begin_int()

When __block_write_begin_int() was converted to support folios, we did not
expect large folios to be passed to it.  With the current work to support
large block size storage devices, this will no longer be true so change
the checks on 'from' and 'to' to be related to the size of the folio
instead of PAGE_SIZE.  Also remove an assumption that the block size is
smaller than PAGE_SIZE.

Link: https://lkml.kernel.org/r/20231109210608.2252323-7-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/buffer.c