summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-03-06 05:46:19 +0300
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-18 05:40:45 +0400
commit3937be5ba836a204d3d1df96b518eecd6cdacbb9 (patch)
tree89c21be058d0b1b43718f49025600346524cd68e /fs/xfs/xfs_vnodeops.c
parenta3da789640871c897901c5f766e33be78d56f35a (diff)
downloadlinux-3937be5ba836a204d3d1df96b518eecd6cdacbb9.tar.xz
[XFS] cleanup vnode use in xfs_symlink and xfs_rename
SGI-PV: 976035 SGI-Modid: xfs-linux-melb:xfs-kern:30548a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 10d2d22eb037..fa694dc5d309 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -3059,10 +3059,9 @@ xfs_symlink(
bhv_vname_t *dentry,
char *target_path,
mode_t mode,
- bhv_vnode_t **vpp,
+ xfs_inode_t **ipp,
cred_t *credp)
{
- bhv_vnode_t *dir_vp = XFS_ITOV(dp);
xfs_mount_t *mp = dp->i_mount;
xfs_trans_t *tp;
xfs_inode_t *ip;
@@ -3088,7 +3087,7 @@ xfs_symlink(
char *link_name = VNAME(dentry);
int link_namelen;
- *vpp = NULL;
+ *ipp = NULL;
error = 0;
ip = NULL;
tp = NULL;
@@ -3227,7 +3226,7 @@ xfs_symlink(
* transaction cancel unlocking dp so don't do it explicitly in the
* error path.
*/
- VN_HOLD(dir_vp);
+ IHOLD(dp);
xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
unlock_dp_on_error = B_FALSE;
@@ -3343,13 +3342,8 @@ std_return:
0, error, 0);
}
- if (!error) {
- bhv_vnode_t *vp;
-
- ASSERT(ip);
- vp = XFS_ITOV(ip);
- *vpp = vp;
- }
+ if (!error)
+ *ipp = ip;
return error;
error2: