mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
DAFS: VnLock after VnWaitQuiescent in VAllocVnode
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. Change-Id: Ib234634dba9d09eea877bc91660ea3a8a4e2b746 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>
This commit is contained in:
parent
08ffe3e81d
commit
b41575d176
@ -669,9 +669,6 @@ VAllocVnode_r(Error * ec, Volume * vp, VnodeType type)
|
||||
/* 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:
|
||||
@ -689,6 +686,9 @@ VAllocVnode_r(Error * ec, Volume * vp, VnodeType type)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* other users present; follow locking hierarchy */
|
||||
VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, MIGHT_DEADLOCK);
|
||||
|
||||
/*
|
||||
* verify state of the world hasn't changed
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user