aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-08-13 02:22:09 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-08-13 02:22:09 -0400
commitdf80c933f9eb01a7af3812bbe437e38205386304 (patch)
treeea20515f5f77558a63de202dcdb36fd96b91ffbd /fs/xfs/xfs_inode.c
parente1cccd917be7364f81b5dc4e33ee3a6e0db21a99 (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_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 8da67d5717c8..efac8857ccb1 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1399,7 +1399,6 @@ xfs_itruncate_start(
1399 xfs_fsize_t last_byte; 1399 xfs_fsize_t last_byte;
1400 xfs_off_t toss_start; 1400 xfs_off_t toss_start;
1401 xfs_mount_t *mp; 1401 xfs_mount_t *mp;
1402 bhv_vnode_t *vp;
1403 int error = 0; 1402 int error = 0;
1404 1403
1405 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL)); 1404 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
@@ -1408,7 +1407,6 @@ xfs_itruncate_start(
1408 (flags == XFS_ITRUNC_MAYBE)); 1407 (flags == XFS_ITRUNC_MAYBE));
1409 1408
1410 mp = ip->i_mount; 1409 mp = ip->i_mount;
1411 vp = VFS_I(ip);
1412 1410
1413 /* wait for the completion of any pending DIOs */ 1411 /* wait for the completion of any pending DIOs */
1414 if (new_size < ip->i_size) 1412 if (new_size < ip->i_size)
@@ -1457,7 +1455,7 @@ xfs_itruncate_start(
1457 1455
1458#ifdef DEBUG 1456#ifdef DEBUG
1459 if (new_size == 0) { 1457 if (new_size == 0) {
1460 ASSERT(VN_CACHED(vp) == 0); 1458 ASSERT(VN_CACHED(VFS_I(ip)) == 0);
1461 } 1459 }
1462#endif 1460#endif
1463 return error; 1461 return error;
@@ -3465,7 +3463,6 @@ xfs_iflush_all(
3465 xfs_mount_t *mp) 3463 xfs_mount_t *mp)
3466{ 3464{
3467 xfs_inode_t *ip; 3465 xfs_inode_t *ip;
3468 bhv_vnode_t *vp;
3469 3466
3470 again: 3467 again:
3471 XFS_MOUNT_ILOCK(mp); 3468 XFS_MOUNT_ILOCK(mp);
@@ -3480,14 +3477,13 @@ xfs_iflush_all(
3480 continue; 3477 continue;
3481 } 3478 }
3482 3479
3483 vp = VFS_I(ip); 3480 if (!VFS_I(ip)) {
3484 if (!vp) {
3485 XFS_MOUNT_IUNLOCK(mp); 3481 XFS_MOUNT_IUNLOCK(mp);
3486 xfs_finish_reclaim(ip, 0, XFS_IFLUSH_ASYNC); 3482 xfs_finish_reclaim(ip, 0, XFS_IFLUSH_ASYNC);
3487 goto again; 3483 goto again;
3488 } 3484 }
3489 3485
3490 ASSERT(vn_count(vp) == 0); 3486 ASSERT(vn_count(VFS_I(ip)) == 0);
3491 3487
3492 ip = ip->i_mnext; 3488 ip = ip->i_mnext;
3493 } while (ip != mp->m_inodes); 3489 } while (ip != mp->m_inodes);