diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-01-19 13:29:14 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-01-19 13:29:14 +0000 |
commit | 7c43871d32f406affbade96aaed6b59e954c8084 (patch) | |
tree | 7b575dcdbf8c05b60e69371c75eabdba18f57774 /sys/fs | |
parent | 642dbf24b6325e4d6320f40640e974cfd44b582f (diff) | |
download | FreeBSD-src-7c43871d32f406affbade96aaed6b59e954c8084.zip FreeBSD-src-7c43871d32f406affbade96aaed6b59e954c8084.tar.gz |
Lock the new directory vnode returned by coda_mkdir(), as this is required
by FreeBSD's vnode locking protocol.
MFC after: 3 days
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/coda/coda_vnops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 5f1cb0c..d28ff9a 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -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 { |