Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95001
b: refs/heads/master
c: 82dab94
h: refs/heads/master
i:
  94999: 3e6d9f5
v: v3
  • Loading branch information
Christoph Hellwig authored and Lachlan McIlroy committed Apr 29, 2008
1 parent d5e6196 commit 8edc5af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ac74e01df959e3e91baded7c83399372af945a2
refs/heads/master: 82dab941a192d081dd0b7cde3ed32603372d5acc
25 changes: 6 additions & 19 deletions trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2180,7 +2180,7 @@ xfs_remove(
xfs_itrace_ref(ip);

error = XFS_QM_DQATTACH(mp, dp, 0);
if (!error && dp != ip)
if (!error)
error = XFS_QM_DQATTACH(mp, ip, 0);
if (error) {
REMOVE_DEBUG_TRACE(__LINE__);
Expand Down Expand Up @@ -2228,15 +2228,9 @@ xfs_remove(
* inodes locked.
*/
xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
if (dp != ip) {
/*
* Increment vnode ref count only in this case since
* there's an extra vnode reference in the case where
* dp == ip.
*/
IHOLD(dp);
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
}

IHOLD(dp);
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);

/*
* Entry must exist since we did a lookup in xfs_lock_dir_and_entry.
Expand Down Expand Up @@ -2747,7 +2741,7 @@ xfs_rmdir(
* Get the dquots for the inodes.
*/
error = XFS_QM_DQATTACH(mp, dp, 0);
if (!error && dp != cdp)
if (!error)
error = XFS_QM_DQATTACH(mp, cdp, 0);
if (error) {
IRELE(cdp);
Expand Down Expand Up @@ -2796,14 +2790,7 @@ xfs_rmdir(
}

xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
if (dp != cdp) {
/*
* Only increment the parent directory vnode count if
* we didn't bump it in looking up cdp. The only time
* we don't bump it is when we're looking up ".".
*/
VN_HOLD(dir_vp);
}
VN_HOLD(dir_vp);

xfs_itrace_ref(cdp);
xfs_trans_ijoin(tp, cdp, XFS_ILOCK_EXCL);
Expand Down

0 comments on commit 8edc5af

Please sign in to comment.