From: Christoph Hellwig Date: Mon, 18 Aug 2025 05:06:45 +0000 (+0200) Subject: xfs: reject swapon for inodes on a zoned file system earlier X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8e5a2441e18640fb22a25fd097368957bf5cab91;p=users%2Fjedix%2Flinux-maple.git xfs: reject swapon for inodes on a zoned file system earlier No point in going down into the iomap mapping loop when we know it will be rejected. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hans Holmberg Signed-off-by: Carlos Maiolino --- diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 1ee4f835ac3c3..a26f798155331 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -760,6 +760,9 @@ xfs_vm_swap_activate( { struct xfs_inode *ip = XFS_I(file_inode(swap_file)); + if (xfs_is_zoned_inode(ip)) + return -EINVAL; + /* * Swap file activation can race against concurrent shared extent * removal in files that have been cloned. If this happens,