]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Mon, 20 Nov 2023 21:16:31 +0000 (13:16 -0800)
commit32855b67d456d6b030920c7948a64b28a5a6a668
tree641c0d745a5fb2bf42733886b5794bb4578513ae
parentdff4f38c79f389892f25e8f07a64ff34a5831153
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