diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-08-01 06:33:11 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-08-01 06:33:11 +0000 |
commit | 14576629bb22f3d138eefb61cf9b1f76d718846a (patch) | |
tree | 64b62ddad947495596467b9d11f2f857916cb865 /sys/kern/vfs_lookup.c | |
parent | 21c162605b1d937704cbabcf6168e647132af538 (diff) | |
download | src-14576629bb22f3d138eefb61cf9b1f76d718846a.tar.gz src-14576629bb22f3d138eefb61cf9b1f76d718846a.zip |
vfs: convert ni_rigthsneeded to a pointer
Shaves 8 bytes of struct nameidata on 64-bit platforms.
Notes
Notes:
svn path=/head/; revision=363753
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r-- | sys/kern/vfs_lookup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 2e06319a25b3..fd6f3189e253 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -347,7 +347,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) *dpp = pwd->pwd_cdir; vrefact(*dpp); } else { - rights = ndp->ni_rightsneeded; + rights = *ndp->ni_rightsneeded; cap_rights_set_one(&rights, CAP_LOOKUP); if (cnp->cn_flags & AUDITVNODE1) @@ -403,7 +403,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) ndp->ni_beneath_latch = pwd->pwd_cdir; vrefact(ndp->ni_beneath_latch); } else { - rights = ndp->ni_rightsneeded; + rights = *ndp->ni_rightsneeded; cap_rights_set_one(&rights, CAP_LOOKUP); error = fgetvp_rights(td, ndp->ni_dirfd, &rights, &dirfd_caps, &ndp->ni_beneath_latch); @@ -1381,7 +1381,7 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg, ndp->ni_resflags = 0; filecaps_init(&ndp->ni_filecaps); ndp->ni_cnd.cn_thread = td; - ndp->ni_rightsneeded = *rightsp; + ndp->ni_rightsneeded = rightsp; } /* |