Lock the new directory vnode returned by coda_mkdir(), as this is required
by FreeBSD's vnode locking protocol. MFC after: 3 days
This commit is contained in:
parent
6885d70dfe
commit
d883e8e720
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175474
@ -1297,6 +1297,10 @@ coda_mkdir(struct vop_mkdir_args *ap)
|
||||
/* Invalidate the parent's attr cache, the modification time has changed */
|
||||
VTOC(dvp)->c_flags &= ~C_VATTR;
|
||||
|
||||
if ((error = VOP_LOCK(*vpp, LK_EXCLUSIVE))) {
|
||||
panic("coda_create: couldn't lock child");
|
||||
}
|
||||
|
||||
CODADEBUG( CODA_MKDIR, myprintf(("mkdir: %s result %d\n",
|
||||
coda_f2s(&VFid), error)); )
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user