aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_iops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 62899a1ec7f7..1df48209d60a 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -395,23 +395,22 @@ xfs_vn_link(
395 struct inode *dir, 395 struct inode *dir,
396 struct dentry *dentry) 396 struct dentry *dentry)
397{ 397{
398 struct inode *ip; /* inode of guy being linked to */ 398 struct inode *inode; /* inode of guy being linked to */
399 bhv_vnode_t *vp; /* vp of name being linked */
400 int error; 399 int error;
401 400
402 ip = old_dentry->d_inode; /* inode being linked to */ 401 inode = old_dentry->d_inode;
403 vp = vn_from_inode(ip);
404 402
405 VN_HOLD(vp); 403 igrab(inode);
406 error = xfs_link(XFS_I(dir), vp, dentry); 404 error = xfs_link(XFS_I(dir), XFS_I(inode), dentry);
407 if (unlikely(error)) { 405 if (unlikely(error)) {
408 VN_RELE(vp); 406 iput(inode);
409 } else { 407 return -error;
410 xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED);
411 xfs_validate_fields(ip);
412 d_instantiate(dentry, ip);
413 } 408 }
414 return -error; 409
410 xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED);
411 xfs_validate_fields(inode);
412 d_instantiate(dentry, inode);
413 return 0;
415} 414}
416 415
417STATIC int 416STATIC int