[XFS] implement IHOLD/IRELE directly

Now that all direct calls to VN_HOLD/VN_RELE are gone we can implement
IHOLD/IRELE directly.

For the IHOLD case also replace igrab with a direct increment of i_count
because we are guaranteed to already have a live and referenced inode by
the VFS. Also remove the vn_hold statistic because it's been rather
meaningless for some time with most references done by other callers.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31764a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
Christoph Hellwig
2008-08-13 16:13:45 +10:00
committed by Lachlan McIlroy
parent 0b1f917730
commit 907f49a8f5
3 changed files with 11 additions and 36 deletions

View File

@ -82,24 +82,6 @@ vn_ioerror(
xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l);
}
/*
* Add a reference to a referenced vnode.
*/
bhv_vnode_t *
vn_hold(
bhv_vnode_t *vp)
{
struct inode *inode;
XFS_STATS_INC(vn_hold);
inode = igrab(vp);
ASSERT(inode);
return vp;
}
#ifdef XFS_INODE_TRACE
/*