summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-31 05:22:45 +0000
committerjeff <jeff@FreeBSD.org>2005-03-31 05:22:45 +0000
commite4d4b610ba46c67741445dba97004a3acf77973d (patch)
tree608f481969550a332d278ecd165c72eaced61742 /sys/kern
parentf13ee4b8f22cddc38cdb5c5b16cd6f8f3cf1a8dd (diff)
downloadFreeBSD-src-e4d4b610ba46c67741445dba97004a3acf77973d.zip
FreeBSD-src-e4d4b610ba46c67741445dba97004a3acf77973d.tar.gz
- Disable vfs shared locks by default. They must be specifically enabled
on filesystems which safely support them. It appears that many network filesystems specifically are not shared lock safe. Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_subr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 09fc95f..7cb1ac4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -831,7 +831,11 @@ getnewvnode(tag, mp, vops, vpp)
*/
vp->v_vnlock = &vp->v_lock;
mtx_init(&vp->v_interlock, "vnode interlock", NULL, MTX_DEF);
- lockinit(vp->v_vnlock, PVFS, tag, VLKTIMEOUT, 0);
+ /*
+ * By default, don't allow shared locks unless filesystems
+ * opt-in.
+ */
+ lockinit(vp->v_vnlock, PVFS, tag, VLKTIMEOUT, LK_NOSHARE);
/*
* Initialize bufobj.
*/
OpenPOWER on IntegriCloud