aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index b75c9bb6e71e..28a5e8ae3829 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -489,8 +489,7 @@ xfs_qm_need_dqattach(
489 return false; 489 return false;
490 if (!XFS_NOT_DQATTACHED(mp, ip)) 490 if (!XFS_NOT_DQATTACHED(mp, ip))
491 return false; 491 return false;
492 if (ip->i_ino == mp->m_sb.sb_uquotino || 492 if (xfs_is_quota_inode(&mp->m_sb, ip->i_ino))
493 ip->i_ino == mp->m_sb.sb_gquotino)
494 return false; 493 return false;
495 return true; 494 return true;
496} 495}
@@ -606,8 +605,7 @@ xfs_qm_dqdetach(
606 605
607 trace_xfs_dquot_dqdetach(ip); 606 trace_xfs_dquot_dqdetach(ip);
608 607
609 ASSERT(ip->i_ino != ip->i_mount->m_sb.sb_uquotino); 608 ASSERT(!xfs_is_quota_inode(&ip->i_mount->m_sb, ip->i_ino));
610 ASSERT(ip->i_ino != ip->i_mount->m_sb.sb_gquotino);
611 if (ip->i_udquot) { 609 if (ip->i_udquot) {
612 xfs_qm_dqrele(ip->i_udquot); 610 xfs_qm_dqrele(ip->i_udquot);
613 ip->i_udquot = NULL; 611 ip->i_udquot = NULL;
@@ -1152,7 +1150,7 @@ xfs_qm_dqusage_adjust(
1152 * rootino must have its resources accounted for, not so with the quota 1150 * rootino must have its resources accounted for, not so with the quota
1153 * inodes. 1151 * inodes.
1154 */ 1152 */
1155 if (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino) { 1153 if (xfs_is_quota_inode(&mp->m_sb, ino)) {
1156 *res = BULKSTAT_RV_NOTHING; 1154 *res = BULKSTAT_RV_NOTHING;
1157 return XFS_ERROR(EINVAL); 1155 return XFS_ERROR(EINVAL);
1158 } 1156 }