aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dquot.c
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2012-01-23 12:31:25 -0500
committerBen Myers <bpm@sgi.com>2012-02-03 10:42:53 -0500
commit6967b964c1012231f338445f20f877e680cd4cb8 (patch)
treebbf07cd6220f957eed9dead914f8603548c21fbb /fs/xfs/xfs_dquot.c
parentb9957308452afcf58e656db834f44df10d7b1662 (diff)
Define a new function xfs_this_quota_on()
Create a new function xfs_this_quota_on() that takes a xfs_mount data structure and a disk quota type and returns true if the specified type of quota is ON in the xfs_mount data structure. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dquot.c')
-rw-r--r--fs/xfs/xfs_dquot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index b4ff40b5f918..4c8b3d2cc961 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -358,7 +358,7 @@ xfs_qm_dqalloc(
358 * Return if this type of quotas is turned off while we didn't 358 * Return if this type of quotas is turned off while we didn't
359 * have an inode lock 359 * have an inode lock
360 */ 360 */
361 if (XFS_IS_THIS_QUOTA_OFF(dqp)) { 361 if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) {
362 xfs_iunlock(quotip, XFS_ILOCK_EXCL); 362 xfs_iunlock(quotip, XFS_ILOCK_EXCL);
363 return (ESRCH); 363 return (ESRCH);
364 } 364 }
@@ -460,7 +460,7 @@ xfs_qm_dqtobp(
460 dqp->q_fileoffset = (xfs_fileoff_t)id / mp->m_quotainfo->qi_dqperchunk; 460 dqp->q_fileoffset = (xfs_fileoff_t)id / mp->m_quotainfo->qi_dqperchunk;
461 461
462 xfs_ilock(quotip, XFS_ILOCK_SHARED); 462 xfs_ilock(quotip, XFS_ILOCK_SHARED);
463 if (XFS_IS_THIS_QUOTA_OFF(dqp)) { 463 if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) {
464 /* 464 /*
465 * Return if this type of quotas is turned off while we 465 * Return if this type of quotas is turned off while we
466 * didn't have the quota inode lock. 466 * didn't have the quota inode lock.