mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-10 08:33:14 +00:00
[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:
parent
204ab25f36
commit
75e17b3caf
10 changed files with 33 additions and 41 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue