[XFS] replace vn_get usage by ihold
SGI-PV: 938306 SGI-Modid: xfs-linux:xfs-kern:194627a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
committed by
Nathan Scott
parent
bb3f724e12
commit
cdb626878f
@@ -162,30 +162,6 @@ vn_initialize(
|
||||
return vp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a reference on a vnode.
|
||||
*/
|
||||
vnode_t *
|
||||
vn_get(
|
||||
struct vnode *vp,
|
||||
vmap_t *vmap)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
||||
XFS_STATS_INC(vn_get);
|
||||
inode = LINVFS_GET_IP(vp);
|
||||
if (inode->i_state & I_FREEING)
|
||||
return NULL;
|
||||
|
||||
inode = ilookup(vmap->v_vfsp->vfs_super, vmap->v_ino);
|
||||
if (!inode) /* Inode not present */
|
||||
return NULL;
|
||||
|
||||
vn_trace_exit(vp, "vn_get", (inst_t *)__return_address);
|
||||
|
||||
return vp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Revalidate the Linux inode from the vattr.
|
||||
* Note: i_size _not_ updated; we must hold the inode
|
||||
|
Reference in New Issue
Block a user