Re: [PATCH 3/3] xfs: reject swapon for inodes on a zoned file system earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/08/2025 07:07, Christoph Hellwig wrote:
> No point in going down into the iomap mapping loop when we known it
> will be rejected.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  fs/xfs/xfs_aops.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> 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,

Looks good to me.

Reviewed-by: Hans Holmberg <hans.holmberg@xxxxxxx>




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux