diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-08-13 02:22:09 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 02:22:09 -0400 |
commit | df80c933f9eb01a7af3812bbe437e38205386304 (patch) | |
tree | ea20515f5f77558a63de202dcdb36fd96b91ffbd /fs/xfs/xfs_dfrag.c | |
parent | e1cccd917be7364f81b5dc4e33ee3a6e0db21a99 (diff) |
[XFS] remove some easy bhv_vnode_t instances
In various places we can just move a VFS_I call into the argument list of
called functions/macros instead of having a local bhv_vnode_t.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31776a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dfrag.c')
-rw-r--r-- | fs/xfs/xfs_dfrag.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 5ce91a00425f..760f4c5b5160 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c | |||
@@ -130,7 +130,6 @@ xfs_swap_extents( | |||
130 | xfs_mount_t *mp; | 130 | xfs_mount_t *mp; |
131 | xfs_trans_t *tp; | 131 | xfs_trans_t *tp; |
132 | xfs_bstat_t *sbp = &sxp->sx_stat; | 132 | xfs_bstat_t *sbp = &sxp->sx_stat; |
133 | bhv_vnode_t *vp, *tvp; | ||
134 | xfs_ifork_t *tempifp, *ifp, *tifp; | 133 | xfs_ifork_t *tempifp, *ifp, *tifp; |
135 | int ilf_fields, tilf_fields; | 134 | int ilf_fields, tilf_fields; |
136 | static uint lock_flags = XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL; | 135 | static uint lock_flags = XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL; |
@@ -149,8 +148,6 @@ xfs_swap_extents( | |||
149 | } | 148 | } |
150 | 149 | ||
151 | sbp = &sxp->sx_stat; | 150 | sbp = &sxp->sx_stat; |
152 | vp = VFS_I(ip); | ||
153 | tvp = VFS_I(tip); | ||
154 | 151 | ||
155 | xfs_lock_two_inodes(ip, tip, lock_flags); | 152 | xfs_lock_two_inodes(ip, tip, lock_flags); |
156 | locked = 1; | 153 | locked = 1; |
@@ -174,7 +171,7 @@ xfs_swap_extents( | |||
174 | goto error0; | 171 | goto error0; |
175 | } | 172 | } |
176 | 173 | ||
177 | if (VN_CACHED(tvp) != 0) { | 174 | if (VN_CACHED(VFS_I(tip)) != 0) { |
178 | xfs_inval_cached_trace(tip, 0, -1, 0, -1); | 175 | xfs_inval_cached_trace(tip, 0, -1, 0, -1); |
179 | error = xfs_flushinval_pages(tip, 0, -1, | 176 | error = xfs_flushinval_pages(tip, 0, -1, |
180 | FI_REMAPF_LOCKED); | 177 | FI_REMAPF_LOCKED); |
@@ -183,7 +180,7 @@ xfs_swap_extents( | |||
183 | } | 180 | } |
184 | 181 | ||
185 | /* Verify O_DIRECT for ftmp */ | 182 | /* Verify O_DIRECT for ftmp */ |
186 | if (VN_CACHED(tvp) != 0) { | 183 | if (VN_CACHED(VFS_I(tip)) != 0) { |
187 | error = XFS_ERROR(EINVAL); | 184 | error = XFS_ERROR(EINVAL); |
188 | goto error0; | 185 | goto error0; |
189 | } | 186 | } |
@@ -227,7 +224,7 @@ xfs_swap_extents( | |||
227 | * vop_read (or write in the case of autogrow) they block on the iolock | 224 | * vop_read (or write in the case of autogrow) they block on the iolock |
228 | * until we have switched the extents. | 225 | * until we have switched the extents. |
229 | */ | 226 | */ |
230 | if (VN_MAPPED(vp)) { | 227 | if (VN_MAPPED(VFS_I(ip))) { |
231 | error = XFS_ERROR(EBUSY); | 228 | error = XFS_ERROR(EBUSY); |
232 | goto error0; | 229 | goto error0; |
233 | } | 230 | } |