aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-02-13 08:26:42 -0500
committerAlex Elder <aelder@sgi.com>2011-02-22 21:32:28 -0500
commitec3ba85f4083d10e32fe58b46db02d78ef71f6b8 (patch)
treebf8e3b41e913c80f24673b87fb390ce6903d82ac /fs/xfs/quota
parent1050c71e2925ab0cb025e4c89e08b15529a1ee36 (diff)
xfs: more sensible inode refcounting for ialloc
Currently we return iodes from xfs_ialloc with just a single reference held. But we need two references, as one is dropped during transaction commit and the second needs to be transfered to the VFS. Change xfs_ialloc to use xfs_iget plus xfs_trans_ijoin_ref to grab two references to the inode, and remove the now superflous IHOLD calls from all callers. This also greatly simplifies the error handling in xfs_create and also allow to remove xfs_trans_iget as no other callers are left. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r--fs/xfs/quota/xfs_qm.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 206a2815ced6..f517963aec07 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -1230,13 +1230,6 @@ xfs_qm_qino_alloc(
1230 } 1230 }
1231 1231
1232 /* 1232 /*
1233 * Keep an extra reference to this quota inode. This inode is
1234 * locked exclusively and joined to the transaction already.
1235 */
1236 ASSERT(xfs_isilocked(*ip, XFS_ILOCK_EXCL));
1237 IHOLD(*ip);
1238
1239 /*
1240 * Make the changes in the superblock, and log those too. 1233 * Make the changes in the superblock, and log those too.
1241 * sbfields arg may contain fields other than *QUOTINO; 1234 * sbfields arg may contain fields other than *QUOTINO;
1242 * VERSIONNUM for example. 1235 * VERSIONNUM for example.