]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fuse: Check for large folio with SPLICE_F_MOVE
authorBernd Schubert <bschubert@ddn.com>
Sun, 11 Jan 2026 11:48:07 +0000 (12:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Apr 2026 13:30:17 +0000 (07:30 -0600)
commit 59ba47b6be9cd0146ef9a55c6e32e337e11e7625 upstream.

xfstest generic/074 and generic/075 complain result in kernel
warning messages / page dumps.
This is easily reproducible (on 6.19) with
CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ALWAYS=y
CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ALWAYS=y

This just adds a test for large folios fuse_try_move_folio
with the same page copy fallback, but to avoid the warnings
from fuse_check_folio().

Cc: stable@vger.kernel.org
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dev.c

index 7dc7965e75653b7f9e7c5ee2052a93864a69fece..4010bc36dfcc03936e7f324bb51dc82e3a8082e7 100644 (file)
@@ -1017,6 +1017,9 @@ static int fuse_try_move_folio(struct fuse_copy_state *cs, struct folio **foliop
        folio_clear_uptodate(newfolio);
        folio_clear_mappedtodisk(newfolio);
 
+       if (folio_test_large(newfolio))
+               goto out_fallback_unlock;
+
        if (fuse_check_folio(newfolio) != 0)
                goto out_fallback_unlock;