[XFS] kill xfs_get_dir_entry
Instead of of xfs_get_dir_entry use a macro to get the xfs_inode from the dentry in the callers and grab the reference manually. Only grab the reference once as it's fine to keep it over the dmapi calls. (And even that reference is actually superflous in Linux but I'll leave that for another patch) SGI-PV: 976035 SGI-Modid: xfs-linux-melb:xfs-kern:30531a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:

committed by
Lachlan McIlroy

parent
a8b3acd57e
commit
43973964a3
@@ -40,28 +40,6 @@
|
||||
#include "xfs_itable.h"
|
||||
#include "xfs_utils.h"
|
||||
|
||||
/*
|
||||
* xfs_get_dir_entry is used to get a reference to an inode given
|
||||
* its parent directory inode and the name of the file. It does
|
||||
* not lock the child inode, and it unlocks the directory before
|
||||
* returning. The directory's generation number is returned for
|
||||
* use by a later call to xfs_lock_dir_and_entry.
|
||||
*/
|
||||
int
|
||||
xfs_get_dir_entry(
|
||||
bhv_vname_t *dentry,
|
||||
xfs_inode_t **ipp)
|
||||
{
|
||||
bhv_vnode_t *vp;
|
||||
|
||||
vp = VNAME_TO_VNODE(dentry);
|
||||
|
||||
*ipp = xfs_vtoi(vp);
|
||||
if (!*ipp)
|
||||
return XFS_ERROR(ENOENT);
|
||||
VN_HOLD(vp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
xfs_dir_lookup_int(
|
||||
|
Reference in New Issue
Block a user