svn commit: r338835 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Thu Sep 20 18:25:27 UTC 2018
Author: mjg
Date: Thu Sep 20 18:25:26 2018
New Revision: 338835
URL: https://svnweb.freebsd.org/changeset/base/338835
Log:
vfs: remove lookup_shared tunable
Reviewed by: kib, jhb
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17253
Modified:
head/sys/kern/vfs_lookup.c
Modified: head/sys/kern/vfs_lookup.c
==============================================================================
--- head/sys/kern/vfs_lookup.c Thu Sep 20 18:24:32 2018 (r338834)
+++ head/sys/kern/vfs_lookup.c Thu Sep 20 18:25:26 2018 (r338835)
@@ -160,10 +160,6 @@ nameiinit(void *dummy __unused)
}
SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nameiinit, NULL);
-static int lookup_shared = 1;
-SYSCTL_INT(_vfs, OID_AUTO, lookup_shared, CTLFLAG_RWTUN, &lookup_shared, 0,
- "enables shared locks for path name translation");
-
static int lookup_cap_dotdot = 1;
SYSCTL_INT(_vfs, OID_AUTO, lookup_cap_dotdot, CTLFLAG_RWTUN,
&lookup_cap_dotdot, 0,
@@ -307,8 +303,6 @@ namei(struct nameidata *ndp)
("namei: flags contaminated with nameiops"));
MPASS(ndp->ni_startdir == NULL || ndp->ni_startdir->v_type == VDIR ||
ndp->ni_startdir->v_type == VBAD);
- if (!lookup_shared)
- cnp->cn_flags &= ~LOCKSHARED;
fdp = p->p_fd;
TAILQ_INIT(&ndp->ni_cap_tracker);
ndp->ni_lcf = 0;
@@ -660,10 +654,7 @@ lookup(struct nameidata *ndp)
* We use shared locks until we hit the parent of the last cn then
* we adjust based on the requesting flags.
*/
- if (lookup_shared)
- cnp->cn_lkflags = LK_SHARED;
- else
- cnp->cn_lkflags = LK_EXCLUSIVE;
+ cnp->cn_lkflags = LK_SHARED;
dp = ndp->ni_startdir;
ndp->ni_startdir = NULLVP;
vn_lock(dp,
@@ -1087,7 +1078,7 @@ nextname:
VOP_UNLOCK(dp, 0);
success:
/*
- * Because of lookup_shared we may have the vnode shared locked, but
+ * Because of shared lookup we may have the vnode shared locked, but
* the caller may want it to be exclusively locked.
*/
if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags) &&
More information about the svn-src-all
mailing list