[XFS] add helper to get xfs_inode from vnode

SGI-PV: 947206
SGI-Modid: xfs-linux-melb:xfs-kern:203960a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
Christoph Hellwig 2006-01-11 20:58:44 +11:00 committed by Nathan Scott
parent 204ab25f36
commit 75e17b3caf
10 changed files with 33 additions and 41 deletions

View file

@ -55,16 +55,13 @@ xfs_get_dir_entry(
xfs_inode_t **ipp)
{
vnode_t *vp;
bhv_desc_t *bdp;
vp = VNAME_TO_VNODE(dentry);
bdp = vn_bhv_lookup_unlocked(VN_BHV_HEAD(vp), &xfs_vnodeops);
if (!bdp) {
*ipp = NULL;
*ipp = xfs_vtoi(vp);
if (!*ipp)
return XFS_ERROR(ENOENT);
}
VN_HOLD(vp);
*ipp = XFS_BHVTOI(bdp);
return 0;
}