Commit 8e5a2441 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Carlos Maiolino
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarHans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
parent 7d523255
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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,