mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
- 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.
This commit is contained in:
parent
ad09e57f41
commit
ae88db8a72
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144049
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user