From: Joanne Koong Date: Wed, 23 Jul 2025 23:08:50 +0000 (-0700) Subject: fuse: remove page alignment check for writeback len X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=595d7ebeaf39ee08180e00fdecf3576a2d702e01;p=thirdparty%2Fkernel%2Flinux.git fuse: remove page alignment check for writeback len Remove incorrect page alignment check for the writeback len arg in fuse_iomap_writeback_range(). len will always be block-aligned as passed in by iomap. On regular fuse filesystems, i_blkbits is set to PAGE_SHIFT so this is not a problem but for fuseblk filesystems, the block size is set to a default of 512 bytes or a block size passed in at mount time. Please note that non-page-aligned lengths are fine for the logic in fuse_iomap_writeback_range(). The check was originally added as a safeguard to detect conspicuously wrong ranges. Signed-off-by: Joanne Koong Fixes: ef7e7cbb323f ("fuse: use iomap for writeback") Reported-by: Linux Kernel Functional Testing Link: https://lore.kernel.org/linux-fsdevel/CA+G9fYs5AdVM-T2Tf3LciNCwLZEHetcnSkHsjZajVwwpM2HmJw@mail.gmail.com/ Reported-by: Sasha Levin Reviewed-by: Darrick J. Wong Signed-off-by: Linus Torvalds --- diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 617fd1b562fdc..95275a1e2f54d 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -2154,8 +2154,6 @@ static ssize_t fuse_iomap_writeback_range(struct iomap_writepage_ctx *wpc, loff_t offset = offset_in_folio(folio, pos); WARN_ON_ONCE(!data); - /* len will always be page aligned */ - WARN_ON_ONCE(len & (PAGE_SIZE - 1)); if (!data->ff) { data->ff = fuse_write_file_get(fi);