]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
xfs: simplify a check in xfs_ioctl_setattr_check_cowextsize
authorChristoph Hellwig <hch@lst.de>
Wed, 18 Mar 2020 15:15:11 +0000 (08:15 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 19 Mar 2020 15:48:47 +0000 (08:48 -0700)
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 <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_ioctl.c

index 5a1d2b9cb05a0caea21a204f1b1de2208b2bdb32..ad825ffa7e4c750d427f24d9d43ce837d8349e07 100644 (file)
@@ -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)