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:
Robert Watson 2008-01-19 13:29:14 +00:00
parent 6885d70dfe
commit d883e8e720
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175474

View File

@ -1296,7 +1296,11 @@ 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 {