From: Christoph Hellwig Date: Wed, 18 Mar 2020 15:15:11 +0000 (-0700) Subject: xfs: simplify a check in xfs_ioctl_setattr_check_cowextsize X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5e28aafe708ba3e388f92a7148093319d3521c2f;p=linux.git xfs: simplify a check in xfs_ioctl_setattr_check_cowextsize Only v5 file systems can have the reflink feature, and those will always use the large dinode format. Remove the extra check for the inode version. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 5a1d2b9cb05a0..ad825ffa7e4c7 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -1473,8 +1473,7 @@ xfs_ioctl_setattr_check_cowextsize( if (!(fa->fsx_xflags & FS_XFLAG_COWEXTSIZE)) return 0; - if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb) || - ip->i_d.di_version != 3) + if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb)) return -EINVAL; if (fa->fsx_cowextsize == 0)