In VAllocVnode, we write-lock the newly-allocated vnode. In DAFS,
however, we need to VnWaitQuiescent_r before VnLock'ing, since VnLock
in DAFS just sets the writer tid/pid. So, in VAllocVnode, move the
VnLock call to after we wait for quiescence, so we don't stomp over
the vnode when someone else has it write-locked.
Reviewed-on: http://gerrit.openafs.org/4059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
b41575d176c2d485d55aed8780bfab9db4b7587d)
Change-Id: I6c3d68f0f5248308d0f32e9fad5c540aaf593962
Reviewed-on: http://gerrit.openafs.org/4169
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
/* This won't block */
VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, WILL_NOT_DEADLOCK);
} else {
- /* other users present; follow locking hierarchy */
- VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, MIGHT_DEADLOCK);
-
#ifdef AFS_DEMAND_ATTACH_FS
/*
* DAFS:
}
#endif
+ /* other users present; follow locking hierarchy */
+ VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, MIGHT_DEADLOCK);
+
/*
* verify state of the world hasn't changed
*