xfs: replace xfs_sb_version checks with feature flag checks
[linux-2.6-microblaze.git] / fs / xfs / xfs_ioctl.c
index 16039ea..86150e0 100644 (file)
@@ -1213,7 +1213,7 @@ xfs_ioctl_setattr_xflags(
 
        /* diflags2 only valid for v3 inodes. */
        i_flags2 = xfs_flags2diflags2(ip, fa->fsx_xflags);
-       if (i_flags2 && !xfs_sb_version_has_v3inode(&mp->m_sb))
+       if (i_flags2 && !xfs_has_v3inodes(mp))
                return -EINVAL;
 
        ip->i_diflags = xfs_flags2diflags(ip, fa->fsx_xflags);
@@ -1362,9 +1362,9 @@ xfs_ioctl_setattr_check_projid(
        if (!fa->fsx_valid)
                return 0;
 
-       /* Disallow 32bit project ids if projid32bit feature is not enabled. */
+       /* Disallow 32bit project ids if 32bit IDs are not enabled. */
        if (fa->fsx_projid > (uint16_t)-1 &&
-           !xfs_sb_version_hasprojid32bit(&ip->i_mount->m_sb))
+           !xfs_has_projid32(ip->i_mount))
                return -EINVAL;
        return 0;
 }
@@ -1450,7 +1450,7 @@ xfs_fileattr_set(
 
        /* Change the ownerships and register project quota modifications */
        if (ip->i_projid != fa->fsx_projid) {
-               if (XFS_IS_QUOTA_RUNNING(mp) && XFS_IS_PQUOTA_ON(mp)) {
+               if (XFS_IS_PQUOTA_ON(mp)) {
                        olddquot = xfs_qm_vop_chown(tp, ip,
                                                &ip->i_pdquot, pdqp);
                }
@@ -1467,7 +1467,7 @@ xfs_fileattr_set(
        else
                ip->i_extsize = 0;
 
-       if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
+       if (xfs_has_v3inodes(mp)) {
                if (ip->i_diflags2 & XFS_DIFLAG2_COWEXTSIZE)
                        ip->i_cowextsize = XFS_B_TO_FSB(mp, fa->fsx_cowextsize);
                else