diff options
author | Christoph Hellwig <hch@sgi.com> | 2006-01-11 04:58:44 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-01-11 04:58:44 -0500 |
commit | 75e17b3caf29b262000dc7348f1be9a7d5403463 (patch) | |
tree | 4bdf782dd3624fd23832b035ebbdbb4daca7dd94 /fs/xfs/xfs_rename.c | |
parent | 204ab25f36fbd44a24458c0227cf2629c8caf00d (diff) |
[XFS] add helper to get xfs_inode from vnode
SGI-PV: 947206
SGI-Modid: xfs-linux-melb:xfs-kern:203960a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rename.c')
-rw-r--r-- | fs/xfs/xfs_rename.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index 4d4e8f4e768e..81a05cfd77d2 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c | |||
@@ -243,7 +243,6 @@ xfs_rename( | |||
243 | xfs_inode_t *inodes[4]; | 243 | xfs_inode_t *inodes[4]; |
244 | int target_ip_dropped = 0; /* dropped target_ip link? */ | 244 | int target_ip_dropped = 0; /* dropped target_ip link? */ |
245 | vnode_t *src_dir_vp; | 245 | vnode_t *src_dir_vp; |
246 | bhv_desc_t *target_dir_bdp; | ||
247 | int spaceres; | 246 | int spaceres; |
248 | int target_link_zero = 0; | 247 | int target_link_zero = 0; |
249 | int num_inodes; | 248 | int num_inodes; |
@@ -260,14 +259,12 @@ xfs_rename( | |||
260 | * Find the XFS behavior descriptor for the target directory | 259 | * Find the XFS behavior descriptor for the target directory |
261 | * vnode since it was not handed to us. | 260 | * vnode since it was not handed to us. |
262 | */ | 261 | */ |
263 | target_dir_bdp = vn_bhv_lookup_unlocked(VN_BHV_HEAD(target_dir_vp), | 262 | target_dp = xfs_vtoi(target_dir_vp); |
264 | &xfs_vnodeops); | 263 | if (target_dp == NULL) { |
265 | if (target_dir_bdp == NULL) { | ||
266 | return XFS_ERROR(EXDEV); | 264 | return XFS_ERROR(EXDEV); |
267 | } | 265 | } |
268 | 266 | ||
269 | src_dp = XFS_BHVTOI(src_dir_bdp); | 267 | src_dp = XFS_BHVTOI(src_dir_bdp); |
270 | target_dp = XFS_BHVTOI(target_dir_bdp); | ||
271 | mp = src_dp->i_mount; | 268 | mp = src_dp->i_mount; |
272 | 269 | ||
273 | if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_RENAME) || | 270 | if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_RENAME) || |