aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_aops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2025-08-18 05:06:45 +0000
committerCarlos Maiolino <[email protected]>2025-08-19 12:38:39 +0000
commit8e5a2441e18640fb22a25fd097368957bf5cab91 (patch)
tree0c643f288d6115972200a4ebae5a9abe63e8a65e /fs/xfs/xfs_aops.c
parentxfs: kick off inodegc when failing to reserve zoned blocks (diff)
downloadkernel-8e5a2441e18640fb22a25fd097368957bf5cab91.tar.gz
kernel-8e5a2441e18640fb22a25fd097368957bf5cab91.zip
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 <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Hans Holmberg <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r--fs/xfs/xfs_aops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 1ee4f835ac3c..a26f79815533 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,