diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index b3b46457f151..d9180020de63 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -422,10 +422,12 @@ xfs_vn_link( | |||
422 | tdvp = vn_from_inode(dir); | 422 | tdvp = vn_from_inode(dir); |
423 | vp = vn_from_inode(ip); | 423 | vp = vn_from_inode(ip); |
424 | 424 | ||
425 | VN_HOLD(vp); | ||
425 | error = bhv_vop_link(tdvp, vp, dentry, NULL); | 426 | error = bhv_vop_link(tdvp, vp, dentry, NULL); |
426 | if (likely(!error)) { | 427 | if (unlikely(error)) { |
428 | VN_RELE(vp); | ||
429 | } else { | ||
427 | VMODIFY(tdvp); | 430 | VMODIFY(tdvp); |
428 | VN_HOLD(vp); | ||
429 | xfs_validate_fields(ip, &vattr); | 431 | xfs_validate_fields(ip, &vattr); |
430 | d_instantiate(dentry, ip); | 432 | d_instantiate(dentry, ip); |
431 | } | 433 | } |