diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-03-05 21:46:19 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:40:45 -0400 |
commit | 3937be5ba836a204d3d1df96b518eecd6cdacbb9 (patch) | |
tree | 89c21be058d0b1b43718f49025600346524cd68e /fs/xfs/xfs_vnodeops.c | |
parent | a3da789640871c897901c5f766e33be78d56f35a (diff) |
[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.c | 16 |
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( | |||
3059 | bhv_vname_t *dentry, | 3059 | bhv_vname_t *dentry, |
3060 | char *target_path, | 3060 | char *target_path, |
3061 | mode_t mode, | 3061 | mode_t mode, |
3062 | bhv_vnode_t **vpp, | 3062 | xfs_inode_t **ipp, |
3063 | cred_t *credp) | 3063 | cred_t *credp) |
3064 | { | 3064 | { |
3065 | bhv_vnode_t *dir_vp = XFS_ITOV(dp); | ||
3066 | xfs_mount_t *mp = dp->i_mount; | 3065 | xfs_mount_t *mp = dp->i_mount; |
3067 | xfs_trans_t *tp; | 3066 | xfs_trans_t *tp; |
3068 | xfs_inode_t *ip; | 3067 | xfs_inode_t *ip; |
@@ -3088,7 +3087,7 @@ xfs_symlink( | |||
3088 | char *link_name = VNAME(dentry); | 3087 | char *link_name = VNAME(dentry); |
3089 | int link_namelen; | 3088 | int link_namelen; |
3090 | 3089 | ||
3091 | *vpp = NULL; | 3090 | *ipp = NULL; |
3092 | error = 0; | 3091 | error = 0; |
3093 | ip = NULL; | 3092 | ip = NULL; |
3094 | tp = NULL; | 3093 | tp = NULL; |
@@ -3227,7 +3226,7 @@ xfs_symlink( | |||
3227 | * transaction cancel unlocking dp so don't do it explicitly in the | 3226 | * transaction cancel unlocking dp so don't do it explicitly in the |
3228 | * error path. | 3227 | * error path. |
3229 | */ | 3228 | */ |
3230 | VN_HOLD(dir_vp); | 3229 | IHOLD(dp); |
3231 | xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); | 3230 | xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); |
3232 | unlock_dp_on_error = B_FALSE; | 3231 | unlock_dp_on_error = B_FALSE; |
3233 | 3232 | ||
@@ -3343,13 +3342,8 @@ std_return: | |||
3343 | 0, error, 0); | 3342 | 0, error, 0); |
3344 | } | 3343 | } |
3345 | 3344 | ||
3346 | if (!error) { | 3345 | if (!error) |
3347 | bhv_vnode_t *vp; | 3346 | *ipp = ip; |
3348 | |||
3349 | ASSERT(ip); | ||
3350 | vp = XFS_ITOV(ip); | ||
3351 | *vpp = vp; | ||
3352 | } | ||
3353 | return error; | 3347 | return error; |
3354 | 3348 | ||
3355 | error2: | 3349 | error2: |