aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-04-20 17:01:53 +1000
committerAlex Elder <aelder@sgi.com>2010-05-19 09:58:15 -0500
commit191f8488f9f7600a96e1500ee2ee74a407e2eb1c (patch)
tree23dbc84d31563e64ff60d99a2974727ca3bf8e42 /fs/xfs/quota/xfs_dquot.c
parent8a7b8a89a3ae5b510396cdcc821698d4aa20afcf (diff)
downloadkernel_samsung_smdk4412-191f8488f9f7600a96e1500ee2ee74a407e2eb1c.zip
kernel_samsung_smdk4412-191f8488f9f7600a96e1500ee2ee74a407e2eb1c.tar.gz
kernel_samsung_smdk4412-191f8488f9f7600a96e1500ee2ee74a407e2eb1c.tar.bz2
xfs: remove a few macro indirections in the quota code
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r--fs/xfs/quota/xfs_dquot.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 9b1e8be..b89ec5d 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -956,16 +956,17 @@ xfs_qm_dqget(
*/
if (ip) {
xfs_ilock(ip, XFS_ILOCK_EXCL);
- if (! XFS_IS_DQTYPE_ON(mp, type)) {
- /* inode stays locked on return */
- xfs_qm_dqdestroy(dqp);
- return XFS_ERROR(ESRCH);
- }
+
/*
* A dquot could be attached to this inode by now, since
* we had dropped the ilock.
*/
if (type == XFS_DQ_USER) {
+ if (!XFS_IS_UQUOTA_ON(mp)) {
+ /* inode stays locked on return */
+ xfs_qm_dqdestroy(dqp);
+ return XFS_ERROR(ESRCH);
+ }
if (ip->i_udquot) {
xfs_qm_dqdestroy(dqp);
dqp = ip->i_udquot;
@@ -973,6 +974,11 @@ xfs_qm_dqget(
goto dqret;
}
} else {
+ if (!XFS_IS_OQUOTA_ON(mp)) {
+ /* inode stays locked on return */
+ xfs_qm_dqdestroy(dqp);
+ return XFS_ERROR(ESRCH);
+ }
if (ip->i_gdquot) {
xfs_qm_dqdestroy(dqp);
dqp = ip->i_gdquot;