diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-03-06 05:44:50 +0300 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-18 05:39:14 +0400 |
commit | 43973964a386348af0a392266f008ba24170aa30 (patch) | |
tree | 17d21f1c23b4bdcd04b1057eaa8509ccad095d1d /fs/xfs/xfs_rename.c | |
parent | a8b3acd57e3aaaf73a863a28e0e9f6cca37cd8e3 (diff) | |
download | linux-43973964a386348af0a392266f008ba24170aa30.tar.xz |
[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>
Diffstat (limited to 'fs/xfs/xfs_rename.c')
-rw-r--r-- | fs/xfs/xfs_rename.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index 1c6d40ed6816..fd1244cf50a7 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c @@ -93,7 +93,8 @@ xfs_lock_for_rename( xfs_inode_t **i_tab,/* array of inode returned, sorted */ int *num_inodes) /* number of inodes in array */ { - xfs_inode_t *ip1, *ip2, *temp; + xfs_inode_t *ip1 = VNAME_TO_INODE(vname1); + xfs_inode_t *ip2, *temp; xfs_ino_t inum1, inum2; int error; int i, j; @@ -109,16 +110,11 @@ xfs_lock_for_rename( * to see if we still have the right inodes, directories, etc. */ lock_mode = xfs_ilock_map_shared(dp1); - error = xfs_get_dir_entry(vname1, &ip1); - if (error) { - xfs_iunlock_map_shared(dp1, lock_mode); - return error; - } + IHOLD(ip1); + xfs_itrace_ref(ip1); inum1 = ip1->i_ino; - ASSERT(ip1); - xfs_itrace_ref(ip1); /* * Unlock dp1 and lock dp2 if they are different. |