aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_utils.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@sgi.com>2006-01-11 04:58:44 -0500
committerNathan Scott <nathans@sgi.com>2006-01-11 04:58:44 -0500
commit75e17b3caf29b262000dc7348f1be9a7d5403463 (patch)
tree4bdf782dd3624fd23832b035ebbdbb4daca7dd94 /fs/xfs/xfs_utils.c
parent204ab25f36fbd44a24458c0227cf2629c8caf00d (diff)
[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>
Diffstat (limited to 'fs/xfs/xfs_utils.c')
-rw-r--r--fs/xfs/xfs_utils.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c
index fefe1d60377f..34654ec6ae10 100644
--- a/fs/xfs/xfs_utils.c
+++ b/fs/xfs/xfs_utils.c
@@ -55,16 +55,13 @@ xfs_get_dir_entry(
55 xfs_inode_t **ipp) 55 xfs_inode_t **ipp)
56{ 56{
57 vnode_t *vp; 57 vnode_t *vp;
58 bhv_desc_t *bdp;
59 58
60 vp = VNAME_TO_VNODE(dentry); 59 vp = VNAME_TO_VNODE(dentry);
61 bdp = vn_bhv_lookup_unlocked(VN_BHV_HEAD(vp), &xfs_vnodeops); 60
62 if (!bdp) { 61 *ipp = xfs_vtoi(vp);
63 *ipp = NULL; 62 if (!*ipp)
64 return XFS_ERROR(ENOENT); 63 return XFS_ERROR(ENOENT);
65 }
66 VN_HOLD(vp); 64 VN_HOLD(vp);
67 *ipp = XFS_BHVTOI(bdp);
68 return 0; 65 return 0;
69} 66}
70 67