From ad09e57f41ee9e309754e3096a22e79ebfcfdfa8 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Thu, 24 Mar 2005 06:02:37 +0000 Subject: [PATCH] - Clear LOCKSHARED if LOOKUP_SHARED is not enabled. This is not strictly necessary since we disable the shared locks in vfs_cache, but it is prefered that the option not leak out into filesystems when it is disabled. Sponsored by: Isilon Systems, Inc. --- sys/kern/vfs_lookup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 52945a9f577..dcbc1541063 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -117,6 +117,9 @@ namei(ndp) ("namei: nameiop contaminated with flags")); KASSERT((cnp->cn_flags & OPMASK) == 0, ("namei: flags contaminated with nameiops")); +#ifndef LOOKUP_SHARED + cnp->cn_flags &= ~LOCKSHARED; +#endif fdp = p->p_fd; /*