diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-03-27 03:01:08 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:49:08 -0400 |
commit | 433550990e6c2e94995239bac6a52b4df454cae0 (patch) | |
tree | 4536c63306b8e6656b969dc71b099e1b2c149454 /fs/xfs/xfs_vfsops.c | |
parent | df26cfe849d8fd767b26fcd4bfebfff67bda9f3a (diff) |
[XFS] remove most calls to VN_RELE
Most VN_RELE calls either directly contain a XFS_ITOV or have the
corresponding xfs_inode already in scope. Use the IRELE helper instead of
VN_RELE to clarify the code. With a little more work we can kill VN_RELE
altogether and define IRELE in terms of iput directly.
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30710a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 4c132a87d437..c21e4d168297 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include "xfs_fsops.h" | 55 | #include "xfs_fsops.h" |
56 | #include "xfs_vnodeops.h" | 56 | #include "xfs_vnodeops.h" |
57 | #include "xfs_vfsops.h" | 57 | #include "xfs_vfsops.h" |
58 | #include "xfs_utils.h" | ||
58 | 59 | ||
59 | 60 | ||
60 | int __init | 61 | int __init |
@@ -595,7 +596,7 @@ xfs_unmount( | |||
595 | /* | 596 | /* |
596 | * Drop the reference count | 597 | * Drop the reference count |
597 | */ | 598 | */ |
598 | VN_RELE(rvp); | 599 | IRELE(rip); |
599 | 600 | ||
600 | /* | 601 | /* |
601 | * If we're forcing a shutdown, typically because of a media error, | 602 | * If we're forcing a shutdown, typically because of a media error, |
@@ -777,8 +778,8 @@ xfs_unmount_flush( | |||
777 | goto fscorrupt_out2; | 778 | goto fscorrupt_out2; |
778 | 779 | ||
779 | if (rbmip) { | 780 | if (rbmip) { |
780 | VN_RELE(XFS_ITOV(rbmip)); | 781 | IRELE(rbmip); |
781 | VN_RELE(XFS_ITOV(rsumip)); | 782 | IRELE(rsumip); |
782 | } | 783 | } |
783 | 784 | ||
784 | xfs_iunlock(rip, XFS_ILOCK_EXCL); | 785 | xfs_iunlock(rip, XFS_ILOCK_EXCL); |
@@ -1156,10 +1157,10 @@ xfs_sync_inodes( | |||
1156 | * above, then wait until after we've unlocked | 1157 | * above, then wait until after we've unlocked |
1157 | * the inode to release the reference. This is | 1158 | * the inode to release the reference. This is |
1158 | * because we can be already holding the inode | 1159 | * because we can be already holding the inode |
1159 | * lock when VN_RELE() calls xfs_inactive(). | 1160 | * lock when IRELE() calls xfs_inactive(). |
1160 | * | 1161 | * |
1161 | * Make sure to drop the mount lock before calling | 1162 | * Make sure to drop the mount lock before calling |
1162 | * VN_RELE() so that we don't trip over ourselves if | 1163 | * IRELE() so that we don't trip over ourselves if |
1163 | * we have to go for the mount lock again in the | 1164 | * we have to go for the mount lock again in the |
1164 | * inactive code. | 1165 | * inactive code. |
1165 | */ | 1166 | */ |
@@ -1167,7 +1168,7 @@ xfs_sync_inodes( | |||
1167 | IPOINTER_INSERT(ip, mp); | 1168 | IPOINTER_INSERT(ip, mp); |
1168 | } | 1169 | } |
1169 | 1170 | ||
1170 | VN_RELE(vp); | 1171 | IRELE(ip); |
1171 | 1172 | ||
1172 | vnode_refed = B_FALSE; | 1173 | vnode_refed = B_FALSE; |
1173 | } | 1174 | } |