From 4ade9f50932060292628f5c2ba82cbdaad081e8b Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 27 Jun 2006 16:13:46 +1000 Subject: [PATCH] --- yaml --- r: 30921 b: refs/heads/master c: 97dfd70c8958a634157e0b35711cca01ff6f959b h: refs/heads/master i: 30919: 4900892166f571ae83f86c5bb9f68796fa32da94 v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_iops.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8178f7165c28..be43fdf6c7ce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 05a3332885dd143496694bcecff223339880d7c9 +refs/heads/master: 97dfd70c8958a634157e0b35711cca01ff6f959b diff --git a/trunk/fs/xfs/linux-2.6/xfs_iops.c b/trunk/fs/xfs/linux-2.6/xfs_iops.c index b3b46457f151..d9180020de63 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_iops.c +++ b/trunk/fs/xfs/linux-2.6/xfs_iops.c @@ -422,10 +422,12 @@ xfs_vn_link( tdvp = vn_from_inode(dir); vp = vn_from_inode(ip); + VN_HOLD(vp); error = bhv_vop_link(tdvp, vp, dentry, NULL); - if (likely(!error)) { + if (unlikely(error)) { + VN_RELE(vp); + } else { VMODIFY(tdvp); - VN_HOLD(vp); xfs_validate_fields(ip, &vattr); d_instantiate(dentry, ip); }