From ae88db8a72f55e1ebdbf5e1272bb7193a57d4d95 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Thu, 24 Mar 2005 06:03:31 +0000 Subject: [PATCH] - Remove the #ifdef LOOKUP_SHARED from some calls to NDINIT. The LOCKSHARED flag is simply ignored in namei() if LOOKUP_SHARED is not enabled. Sponsored by: Isilon Systems, Inc. --- sys/kern/vfs_extattr.c | 8 +------- sys/kern/vfs_syscalls.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index b949bc72553b..162f16911e20 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -2052,13 +2052,8 @@ kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp) struct stat sb; int error, vfslocked; -#ifdef LOOKUP_SHARED NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | NOOBJ | MPSAFE, pathseg, path, td); -#else - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | NOOBJ | MPSAFE, pathseg, path, - td); -#endif if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); @@ -2106,8 +2101,7 @@ kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp struct nameidata nd; int error, vfslocked; - /* XXX LOOKUP_SHARED? */ - NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | NOOBJ | MPSAFE, + NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | NOOBJ | MPSAFE, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index b949bc72553b..162f16911e20 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2052,13 +2052,8 @@ kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp) struct stat sb; int error, vfslocked; -#ifdef LOOKUP_SHARED NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | NOOBJ | MPSAFE, pathseg, path, td); -#else - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | NOOBJ | MPSAFE, pathseg, path, - td); -#endif if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); @@ -2106,8 +2101,7 @@ kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp struct nameidata nd; int error, vfslocked; - /* XXX LOOKUP_SHARED? */ - NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | NOOBJ | MPSAFE, + NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | NOOBJ | MPSAFE, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error);