mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 07:51:00 +00:00
FBSD try-relax child vnode locking (recurse only)
In cases where afs_vop_lookup would return a child vnode locked, continue to take an exclusive lock, but allow recursion (LK_CANRECURSE). Allow recursion also at afs_vop_link, where we specifically encountered a conflict due to recursion. Change-Id: I5f5b0979ce3c86e517f96ea60b96ebdd26401acb Reviewed-on: http://gerrit.openafs.org/2625 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
b727c1e748
commit
ec85304dd7
@ -548,7 +548,7 @@ afs_vop_lookup(ap)
|
||||
MA_VOP_UNLOCK(dvp, 0, p); /* done with parent. */
|
||||
#endif
|
||||
}
|
||||
ma_vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
|
||||
ma_vn_lock(vp, LK_EXCLUSIVE | LK_CANRECURSE | LK_RETRY, p);
|
||||
/* always return the child locked */
|
||||
}
|
||||
*ap->a_vpp = vp;
|
||||
@ -1162,7 +1162,7 @@ afs_vop_link(ap)
|
||||
error = EISDIR;
|
||||
goto out;
|
||||
}
|
||||
if ((error = ma_vn_lock(vp, LK_EXCLUSIVE, p)) != 0) {
|
||||
if ((error = ma_vn_lock(vp, LK_CANRECURSE | LK_EXCLUSIVE, p)) != 0) {
|
||||
goto out;
|
||||
}
|
||||
AFS_GLOCK();
|
||||
|
Loading…
Reference in New Issue
Block a user