The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=bb92cd7bcd16f3f36cdbda18d8193619892715fb

commit bb92cd7bcd16f3f36cdbda18d8193619892715fb
Author:     Mateusz Guzik <[email protected]>
AuthorDate: 2022-03-24 10:10:03 +0000
Commit:     Mateusz Guzik <[email protected]>
CommitDate: 2022-03-24 10:20:51 +0000

    vfs: NDFREE(&nd, NDF_ONLY_PNBUF) -> NDFREE_PNBUF(&nd)
---
 sys/cam/ctl/ctl_backend_block.c                    |  2 +-
 sys/compat/linux/linux_misc.c                      |  2 +-
 .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c   | 10 +--
 sys/dev/beri/virtio/virtio_block.c                 |  2 +-
 sys/dev/md/md.c                                    |  2 +-
 sys/dev/xen/blkback/blkback.c                      |  2 +-
 sys/fs/cd9660/cd9660_vfsops.c                      |  2 +-
 sys/fs/ext2fs/ext2_vfsops.c                        |  2 +-
 sys/fs/fuse/fuse_vfsops.c                          |  2 +-
 sys/fs/msdosfs/msdosfs_vfsops.c                    |  2 +-
 sys/fs/nfs/nfs_commonport.c                        |  2 +-
 sys/fs/nullfs/null_vfsops.c                        |  2 +-
 sys/fs/udf/udf_vfsops.c                            |  2 +-
 sys/fs/unionfs/union_vfsops.c                      |  2 +-
 sys/kern/imgact_elf.c                              |  2 +-
 sys/kern/kern_acct.c                               |  2 +-
 sys/kern/kern_alq.c                                |  2 +-
 sys/kern/kern_ctf.c                                |  2 +-
 sys/kern/kern_exec.c                               |  4 +-
 sys/kern/kern_jail.c                               |  2 +-
 sys/kern/kern_ktrace.c                             |  2 +-
 sys/kern/kern_linker.c                             |  4 +-
 sys/kern/kern_proc.c                               |  2 +-
 sys/kern/kern_sig.c                                |  4 +-
 sys/kern/link_elf.c                                |  2 +-
 sys/kern/link_elf_obj.c                            |  2 +-
 sys/kern/uipc_usrreq.c                             |  4 +-
 sys/kern/vfs_cache.c                               |  2 +-
 sys/kern/vfs_default.c                             |  2 +-
 sys/kern/vfs_extattr.c                             |  8 +--
 sys/kern/vfs_lookup.c                              |  6 +-
 sys/kern/vfs_mount.c                               |  4 +-
 sys/kern/vfs_mountroot.c                           | 10 +--
 sys/kern/vfs_syscalls.c                            | 72 +++++++++++-----------
 sys/kern/vfs_vnops.c                               |  6 +-
 sys/security/audit/audit_syscalls.c                |  2 +-
 sys/security/mac_veriexec/mac_veriexec.c           |  2 +-
 .../mac_veriexec_parser/mac_veriexec_parser.c      |  4 +-
 sys/ufs/ffs/ffs_snapshot.c                         |  8 +--
 sys/ufs/ffs/ffs_vfsops.c                           |  2 +-
 sys/ufs/ufs/ufs_quota.c                            |  2 +-
 sys/vm/swap_pager.c                                |  4 +-
 42 files changed, 102 insertions(+), 102 deletions(-)

diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
index 289da02398cc..61c6c9274d97 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -2261,7 +2261,7 @@ again:
        else
                cbe_lun->flags |= CTL_LUN_FLAG_READONLY;
 
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        be_lun->vn = nd.ni_vp;
 
        /* We only support disks and files. */
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 3287c64ab515..a084e1e9992a 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -289,7 +289,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args 
*args)
                goto cleanup;
 
        vp = ni.ni_vp;
-       NDFREE(&ni, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&ni);
 
        /*
         * From here on down, we have a locked vnode that must be unlocked.
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c 
b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
index 21d121a15846..bd92c4ae647f 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -5368,7 +5368,7 @@ zfs_getextattr_dir(struct vop_getextattr_args *ap, const 
char *attrname)
 #endif
        error = vn_open_cred(&nd, &flags, 0, VN_OPEN_INVFS, ap->a_cred, NULL);
        vp = nd.ni_vp;
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (error != 0)
                return (SET_ERROR(error));
 
@@ -5514,12 +5514,12 @@ zfs_deleteextattr_dir(struct vop_deleteextattr_args 
*ap, const char *attrname)
        error = namei(&nd);
        vp = nd.ni_vp;
        if (error != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                return (SET_ERROR(error));
        }
 
        error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        vput(nd.ni_dvp);
        if (vp == nd.ni_dvp)
@@ -5658,7 +5658,7 @@ zfs_setextattr_dir(struct vop_setextattr_args *ap, const 
char *attrname)
        error = vn_open_cred(&nd, &flags, 0600, VN_OPEN_INVFS, ap->a_cred,
            NULL);
        vp = nd.ni_vp;
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (error != 0)
                return (SET_ERROR(error));
 
@@ -5845,7 +5845,7 @@ zfs_listextattr_dir(struct vop_listextattr_args *ap, 
const char *attrprefix)
 #endif
        error = namei(&nd);
        vp = nd.ni_vp;
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (error != 0)
                return (SET_ERROR(error));
 
diff --git a/sys/dev/beri/virtio/virtio_block.c 
b/sys/dev/beri/virtio/virtio_block.c
index 45c086f0e0bf..b9f5e3175cc8 100644
--- a/sys/dev/beri/virtio/virtio_block.c
+++ b/sys/dev/beri/virtio/virtio_block.c
@@ -245,7 +245,7 @@ open_file(struct beri_vtblk_softc *sc, struct thread *td)
        error = vn_open(&nd, &flags, 0, NULL);
        if (error != 0)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        if (nd.ni_vp->v_type != VREG) {
                return (EINVAL);
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 29dabbdf9d4e..9b8773fc3c91 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -1437,7 +1437,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, 
struct thread *td)
        error = vn_open(&nd, &flags, 0, NULL);
        if (error != 0)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (nd.ni_vp->v_type != VREG) {
                error = EINVAL;
                goto bad;
diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c
index 792933402c93..33414295bf5e 100644
--- a/sys/dev/xen/blkback/blkback.c
+++ b/sys/dev/xen/blkback/blkback.c
@@ -2711,7 +2711,7 @@ xbb_open_backend(struct xbb_softc *xbb)
                return (error);
        }
 
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
                
        xbb->vn = nd.ni_vp;
 
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index 606938c6faf5..30bc8ba6b9c8 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -162,7 +162,7 @@ cd9660_mount(struct mount *mp)
        NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec);
        if ((error = namei(&ndp)))
                return (error);
-       NDFREE(&ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&ndp);
        devvp = ndp.ni_vp;
 
        if (!vn_isdisk_error(devvp, &error)) {
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index b89786b2c2e2..d66d44c6ba32 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -243,7 +243,7 @@ ext2_mount(struct mount *mp)
        NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec);
        if ((error = namei(ndp)) != 0)
                return (error);
-       NDFREE(ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(ndp);
        devvp = ndp->ni_vp;
 
        if (!vn_isdisk_error(devvp, &error)) {
diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c
index f490b8473fbf..d49ab0a63787 100644
--- a/sys/fs/fuse/fuse_vfsops.c
+++ b/sys/fs/fuse/fuse_vfsops.c
@@ -152,7 +152,7 @@ fuse_getdevice(const char *fspec, struct thread *td, struct 
cdev **fdevp)
        NDINIT(ndp, LOOKUP, FOLLOW, UIO_SYSSPACE, fspec);
        if ((err = namei(ndp)) != 0)
                return err;
-       NDFREE(ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(ndp);
        devvp = ndp->ni_vp;
 
        if (devvp->v_type != VCHR) {
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 17c1699a584a..cb7153fe1f7f 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -360,7 +360,7 @@ msdosfs_mount(struct mount *mp)
        if (error)
                return (error);
        devvp = ndp.ni_vp;
-       NDFREE(&ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&ndp);
 
        if (!vn_isdisk_error(devvp, &error)) {
                vput(devvp);
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c
index 2bb89d8ef264..4719e7abf8cf 100644
--- a/sys/fs/nfs/nfs_commonport.c
+++ b/sys/fs/nfs/nfs_commonport.c
@@ -244,7 +244,7 @@ nfsrv_lookupfilename(struct nameidata *ndp, char *fname, 
NFSPROC_T *p __unused)
        NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, fname);
        error = namei(ndp);
        if (!error) {
-               NDFREE(ndp, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(ndp);
        }
        return (error);
 }
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index 21a28dd45570..fd119afa7f07 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -137,7 +137,7 @@ nullfs_mount(struct mount *mp)
 
        if (error)
                return (error);
-       NDFREE(ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(ndp);
 
        /*
         * Sanity check on lower vnode
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index 37554582ef1b..216e1153b39f 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -230,7 +230,7 @@ udf_mount(struct mount *mp)
        NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec);
        if ((error = namei(ndp)))
                return (error);
-       NDFREE(ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(ndp);
        devvp = ndp->ni_vp;
 
        if (!vn_isdisk_error(devvp, &error)) {
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
index dd6e7084ebc1..7e24d089bada 100644
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -236,7 +236,7 @@ unionfs_domount(struct mount *mp)
        if ((error = namei(ndp)))
                return (error);
 
-       NDFREE(ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(ndp);
 
        /* get root vnodes */
        lowerrootvp = mp->mnt_vnodecovered;
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 91c967c0c8de..5f5831aa27fb 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -816,7 +816,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_long 
*addr,
                nd->ni_vp = NULL;
                goto fail;
        }
-       NDFREE(nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(nd);
        imgp->vp = nd->ni_vp;
 
        /*
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 0a29be2dcedf..aaf5ba646295 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -222,7 +222,7 @@ sys_acct(struct thread *td, struct acct_args *uap)
                error = vn_open(&nd, &flags, 0, NULL);
                if (error)
                        return (error);
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
 #ifdef MAC
                error = mac_system_check_acct(td->td_ucred, nd.ni_vp);
                if (error) {
diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c
index 4285ddb03b78..9d279628d95c 100644
--- a/sys/kern/kern_alq.c
+++ b/sys/kern/kern_alq.c
@@ -447,7 +447,7 @@ alq_open_flags(struct alq **alqp, const char *file, struct 
ucred *cred, int cmod
        if (error)
                return (error);
 
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        /* We just unlock so we hold a reference */
        VOP_UNLOCK(nd.ni_vp);
 
diff --git a/sys/kern/kern_ctf.c b/sys/kern/kern_ctf.c
index aafa75eff097..e0e348b83168 100644
--- a/sys/kern/kern_ctf.c
+++ b/sys/kern/kern_ctf.c
@@ -100,7 +100,7 @@ link_elf_ctf_get(linker_file_t lf, linker_ctf_t *lc)
        error = vn_open(&nd, &flags, 0, NULL);
        if (error)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        /* Allocate memory for the FLF header. */
        hdr = malloc(sizeof(*hdr), M_LINKER, M_WAITOK);
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 303c145689ae..33213c8304db 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -691,7 +691,7 @@ interpret:
                                vrele(newtextdvp);
                                newtextdvp = NULL;
                        }
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        free(newbinname, M_PARGS);
                        newbinname = NULL;
                }
@@ -948,7 +948,7 @@ exec_fail_dealloc:
                else
                        VOP_UNLOCK(imgp->vp);
                if (args->fname != NULL)
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                if (newtextdvp != NULL)
                        vrele(newtextdvp);
                free(newbinname, M_PARGS);
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index f1c81d8813bd..bf869362f004 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -1337,7 +1337,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int 
flags)
                if (error)
                        goto done_free;
                root = nd.ni_vp;
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                g_path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
                strlcpy(g_path, path, MAXPATHLEN);
                error = vn_path_to_global_path(td, root, g_path, MAXPATHLEN);
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 5371f73672a0..f102f7e7b0a4 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -1028,7 +1028,7 @@ sys_ktrace(struct thread *td, struct ktrace_args *uap)
                error = vn_open(&nd, &flags, 0, NULL);
                if (error)
                        return (error);
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                vp = nd.ni_vp;
                VOP_UNLOCK(vp);
                if (vp->v_type != VREG) {
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index f28fd30cf209..f1274ff87064 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1883,7 +1883,7 @@ linker_lookup_file(const char *path, int pathlen, const 
char *name,
                flags = FREAD;
                error = vn_open(&nd, &flags, 0, NULL);
                if (error == 0) {
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        type = nd.ni_vp->v_type;
                        if (vap)
                                VOP_GETATTR(nd.ni_vp, vap, td->td_ucred);
@@ -1934,7 +1934,7 @@ linker_hints_lookup(const char *path, int pathlen, const 
char *modname,
        error = vn_open(&nd, &flags, 0, NULL);
        if (error)
                goto bad;
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (nd.ni_vp->v_type != VREG)
                goto bad;
        best = cp = NULL;
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index b5896cedf3b9..d5aae09f2c4e 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -2281,7 +2281,7 @@ proc_get_binpath(struct proc *p, char *binname, char 
**retbuf,
                                if (nd.ni_vp == vp)
                                        do_fullpath = false;
                                vrele(nd.ni_vp);
-                               NDFREE(&nd, NDF_ONLY_PNBUF);
+                               NDFREE_PNBUF(&nd);
                        }
                }
        }
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 4a15bd453557..b1a70bda3e55 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -3667,7 +3667,7 @@ corefile_open_last(struct thread *td, char *name, int 
indexpos,
                        break;
 
                vp = nd.ni_vp;
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                if ((flags & O_CREAT) == O_CREAT) {
                        nextvp = vp;
                        break;
@@ -3840,7 +3840,7 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, 
struct thread *td,
                    NULL);
                if (error == 0) {
                        *vpp = nd.ni_vp;
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                }
        }
 
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c
index cbd30bef4087..2c86c99452f8 100644
--- a/sys/kern/link_elf.c
+++ b/sys/kern/link_elf.c
@@ -988,7 +988,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
        error = vn_open(&nd, &flags, 0, NULL);
        if (error != 0)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (nd.ni_vp->v_type != VREG) {
                error = ENOEXEC;
                firstpage = NULL;
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c
index 9be5f7913b49..076994b44dfd 100644
--- a/sys/kern/link_elf_obj.c
+++ b/sys/kern/link_elf_obj.c
@@ -717,7 +717,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
                free(nd, M_TEMP);
                return error;
        }
-       NDFREE(nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(nd);
        if (nd->ni_vp->v_type != VREG) {
                error = ENOEXEC;
                goto out;
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index c2bf10b1f3e3..f1b7dd75008d 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -642,7 +642,7 @@ restart:
                goto error;
        vp = nd.ni_vp;
        if (vp != NULL || vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                if (nd.ni_dvp == vp)
                        vrele(nd.ni_dvp);
                else
@@ -666,7 +666,7 @@ restart:
 #endif
        if (error == 0)
                error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (error) {
                VOP_VPUT_PAIR(nd.ni_dvp, NULL, true);
                vn_finished_write(mp);
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 147d3075dfac..556c5e459a55 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -3792,7 +3792,7 @@ vn_path_to_global_path(struct thread *td, struct vnode 
*vp, char *path,
                vrele(vp);
                goto out;
        }
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vp1 = nd.ni_vp;
        vrele(vp);
        if (vp1 == vp)
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 6f304f0f719d..d8931a3ae350 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -853,7 +853,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap)
                vn_lock(vp, locked | LK_RETRY);
                return (error);
        }
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        mvp = *dvp = nd.ni_vp;
 
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index d520e1655cf5..4c1851a52e88 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -306,7 +306,7 @@ kern_extattr_set_path(struct thread *td, const char *path, 
int attrnamespace,
        error = namei(&nd);
        if (error)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        error = extattr_set_vp(nd.ni_vp, attrnamespace, attrname, data,
            nbytes, td);
@@ -471,7 +471,7 @@ kern_extattr_get_path(struct thread *td, const char *path, 
int attrnamespace,
        error = namei(&nd);
        if (error)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        error = extattr_get_vp(nd.ni_vp, attrnamespace, attrname, data,
            nbytes, td);
@@ -603,7 +603,7 @@ kern_extattr_delete_path(struct thread *td, const char 
*path, int attrnamespace,
        error = namei(&nd);
        if (error)
                return(error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        error = extattr_delete_vp(nd.ni_vp, attrnamespace, attrname, td);
        vrele(nd.ni_vp);
@@ -746,7 +746,7 @@ kern_extattr_list_path(struct thread *td, const char *path, 
int attrnamespace,
        error = namei(&nd);
        if (error)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        error = extattr_list_vp(nd.ni_vp, attrnamespace, data, nbytes, td);
 
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 1252f4c54d31..5a0871c91fac 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1377,7 +1377,7 @@ bad_eexist:
        vrele(ndp->ni_vp);
        ndp->ni_dvp = NULL;
        ndp->ni_vp = NULL;
-       NDFREE(ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(ndp);
        return (EEXIST);
 }
 
@@ -1759,12 +1759,12 @@ kern_alternate_path(const char *prefix, const char 
*path, enum uio_seg pathseg,
                        if (nd.ni_vp == ndroot.ni_vp)
                                error = ENOENT;
 
-                       NDFREE(&ndroot, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&ndroot);
                        vrele(ndroot.ni_vp);
                }
        }
 
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vrele(nd.ni_vp);
 
 keeporig:
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 61c239cf65b3..a495ad86ac46 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1543,7 +1543,7 @@ vfs_domount(
        error = namei(&nd);
        if (error != 0)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vp = nd.ni_vp;
        if ((fsflags & MNT_UPDATE) == 0) {
                if ((vp->v_vflag & VV_ROOT) != 0 &&
@@ -1635,7 +1635,7 @@ kern_unmount(struct thread *td, const char *path, int 
flags)
                NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1,
                    UIO_SYSSPACE, pathbuf);
                if (namei(&nd) == 0) {
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        error = vn_path_to_global_path(td, nd.ni_vp, pathbuf,
                            MNAMELEN);
                        if (error == 0)
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index d8ad5cf2989b..bafddb7684f4 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -353,7 +353,7 @@ vfs_mountroot_shuffle(struct thread *td, struct mount 
*mpdevfs)
                NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspath);
                error = namei(&nd);
                if (error) {
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        fspath = "/mnt";
                        NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE,
                            fspath);
@@ -377,7 +377,7 @@ vfs_mountroot_shuffle(struct thread *td, struct mount 
*mpdevfs)
                        } else
                                vput(vp);
                }
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
 
                if (error)
                        printf("mountroot: unable to remount previous root "
@@ -414,7 +414,7 @@ vfs_mountroot_shuffle(struct thread *td, struct mount 
*mpdevfs)
        if (error)
                printf("mountroot: unable to remount devfs under /dev "
                    "(error %d)\n", error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
 
        if (mporoot == mpdevfs) {
                vfs_unbusy(mpdevfs);
@@ -729,7 +729,7 @@ parse_mount_dev_present(const char *dev)
        error = namei(&nd);
        if (!error)
                vput(nd.ni_vp);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        return (error != 0) ? 0 : 1;
 }
 
@@ -954,7 +954,7 @@ vfs_mountroot_readconf(struct thread *td, struct sbuf *sb)
        if (error)
                return (error);
 
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        ofs = 0;
        len = sizeof(buf) - 1;
        while (1) {
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 19e06732a9d0..af08d493f68c 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -206,7 +206,7 @@ sys_quotactl(struct thread *td, struct quotactl_args *uap)
            uap->path);
        if ((error = namei(&nd)) != 0)
                return (error);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        mp = nd.ni_vp->v_mount;
        vfs_ref(mp);
        vput(nd.ni_vp);
@@ -1198,7 +1198,7 @@ kern_openat(struct thread *td, int fd, const char *path, 
enum uio_seg pathseg,
                goto bad;
        }
        td->td_dupfd = 0;
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vp = nd.ni_vp;
 
        /*
@@ -1362,7 +1362,7 @@ restart:
                return (error);
        vp = nd.ni_vp;
        if (vp != NULL) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                if (vp == nd.ni_dvp)
                        vrele(nd.ni_dvp);
                else
@@ -1391,7 +1391,7 @@ restart:
                }
        }
        if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                vput(nd.ni_dvp);
                if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0)
                        return (error);
@@ -1413,7 +1413,7 @@ restart:
        VOP_VPUT_PAIR(nd.ni_dvp, error == 0 && !whiteout ? &nd.ni_vp : NULL,
            true);
        vn_finished_write(mp);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (error == ERELOOKUP)
                goto restart;
        return (error);
@@ -1469,7 +1469,7 @@ restart:
        if ((error = namei(&nd)) != 0)
                return (error);
        if (nd.ni_vp != NULL) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                if (nd.ni_vp == nd.ni_dvp)
                        vrele(nd.ni_dvp);
                else
@@ -1478,7 +1478,7 @@ restart:
                return (EEXIST);
        }
        if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                vput(nd.ni_dvp);
                if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0)
                        return (error);
@@ -1499,7 +1499,7 @@ out:
 #endif
        VOP_VPUT_PAIR(nd.ni_dvp, error == 0 ? &nd.ni_vp : NULL, true);
        vn_finished_write(mp);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (error == ERELOOKUP)
                goto restart;
        return (error);
@@ -1597,7 +1597,7 @@ kern_linkat(struct thread *td, int fd1, int fd2, const 
char *path1,
                    segflag, path1, fd1, &cap_linkat_source_rights);
                if ((error = namei(&nd)) != 0)
                        return (error);
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                if ((nd.ni_resflags & NIRES_EMPTYPATH) != 0) {
                        error = priv_check(td, PRIV_VFS_FHOPEN);
                        if (error != 0) {
@@ -1627,7 +1627,7 @@ kern_linkat_vp(struct thread *td, struct vnode *vp, int 
fd, const char *path,
            &cap_linkat_target_rights);
        if ((error = namei(&nd)) == 0) {
                if (nd.ni_vp != NULL) {
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        if (nd.ni_dvp == nd.ni_vp)
                                vrele(nd.ni_dvp);
                        else
@@ -1641,7 +1641,7 @@ kern_linkat_vp(struct thread *td, struct vnode *vp, int 
fd, const char *path,
                         * vp->v_type, since it cannot change, except
                         * to VBAD.
                         */
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        vput(nd.ni_dvp);
                        vrele(vp);
                        return (EXDEV);
@@ -1655,14 +1655,14 @@ kern_linkat_vp(struct thread *td, struct vnode *vp, int 
fd, const char *path,
                        if (error != 0) {
                                vput(vp);
                                vput(nd.ni_dvp);
-                               NDFREE(&nd, NDF_ONLY_PNBUF);
+                               NDFREE_PNBUF(&nd);
                                return (error);
                        }
                        error = vn_start_write(vp, &mp, V_NOWAIT);
                        if (error != 0) {
                                vput(vp);
                                vput(nd.ni_dvp);
-                               NDFREE(&nd, NDF_ONLY_PNBUF);
+                               NDFREE_PNBUF(&nd);
                                error = vn_start_write(NULL, &mp,
                                    V_XSLEEP | PCATCH);
                                if (error != 0)
@@ -1672,11 +1672,11 @@ kern_linkat_vp(struct thread *td, struct vnode *vp, int 
fd, const char *path,
                        error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd);
                        VOP_VPUT_PAIR(nd.ni_dvp, &vp, true);
                        vn_finished_write(mp);
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        vp = NULL;
                } else {
                        vput(nd.ni_dvp);
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        vrele(vp);
                        return (EAGAIN);
                }
@@ -1746,7 +1746,7 @@ restart:
        if ((error = namei(&nd)) != 0)
                goto out;
        if (nd.ni_vp) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                if (nd.ni_vp == nd.ni_dvp)
                        vrele(nd.ni_dvp);
                else
@@ -1757,7 +1757,7 @@ restart:
                goto out;
        }
        if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                vput(nd.ni_dvp);
                if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0)
                        goto out;
@@ -1778,7 +1778,7 @@ out2:
 #endif
        VOP_VPUT_PAIR(nd.ni_dvp, error == 0 ? &nd.ni_vp : NULL, true);
        vn_finished_write(mp);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (error == ERELOOKUP)
                goto restart;
 out:
@@ -1812,7 +1812,7 @@ restart:
                return (error);
 
        if (nd.ni_vp != NULLVP || !(nd.ni_cnd.cn_flags & ISWHITEOUT)) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                if (nd.ni_vp == nd.ni_dvp)
                        vrele(nd.ni_dvp);
                else
@@ -1822,14 +1822,14 @@ restart:
                return (EEXIST);
        }
        if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                vput(nd.ni_dvp);
                if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0)
                        return (error);
                goto restart;
        }
        error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, DELETE);
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vput(nd.ni_dvp);
        vn_finished_write(mp);
        if (error == ERELOOKUP)
@@ -1950,7 +1950,7 @@ restart:
        }
        if (error == 0) {
                if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-                       NDFREE(&nd, NDF_ONLY_PNBUF);
+                       NDFREE_PNBUF(&nd);
                        vput(nd.ni_dvp);
                        if (vp == nd.ni_dvp)
                                vrele(vp);
@@ -1975,7 +1975,7 @@ out:
 #endif
                vn_finished_write(mp);
        }
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vput(nd.ni_dvp);
        if (vp == nd.ni_dvp)
                vrele(vp);
@@ -3479,7 +3479,7 @@ retry:
                vrele(vp);
                return (error);
        }
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
        if (vp->v_type == VDIR)
                error = EISDIR;
@@ -3648,7 +3648,7 @@ kern_renameat_mac(struct thread *td, int oldfd, const 
char *old, int newfd,
        if (fromnd->ni_dvp != fromnd->ni_vp)
                VOP_UNLOCK(fromnd->ni_vp);
        if (error != 0) {
-               NDFREE(fromnd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(fromnd);
                vrele(fromnd->ni_dvp);
                vrele(fromnd->ni_vp);
                if (fromnd->ni_startdir)
@@ -3695,7 +3695,7 @@ again:
                /* Translate error code for rename("dir1", "dir2/."). */
                if (error == EISDIR && fvp->v_type == VDIR)
                        error = EINVAL;
-               NDFREE(&fromnd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&fromnd);
                vrele(fromnd.ni_dvp);
                vrele(fvp);
                goto out1;
@@ -3704,8 +3704,8 @@ again:
        tvp = tond.ni_vp;
        error = vn_start_write(fvp, &mp, V_NOWAIT);
        if (error != 0) {
-               NDFREE(&fromnd, NDF_ONLY_PNBUF);
-               NDFREE(&tond, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&fromnd);
+               NDFREE_PNBUF(&tond);
                if (tvp != NULL)
                        vput(tvp);
                if (tdvp == tvp)
@@ -3762,11 +3762,11 @@ out:
        if (error == 0) {
                error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd,
                    tond.ni_dvp, tond.ni_vp, &tond.ni_cnd);
-               NDFREE(&fromnd, NDF_ONLY_PNBUF);
-               NDFREE(&tond, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&fromnd);
+               NDFREE_PNBUF(&tond);
        } else {
-               NDFREE(&fromnd, NDF_ONLY_PNBUF);
-               NDFREE(&tond, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&fromnd);
+               NDFREE_PNBUF(&tond);
                if (tvp != NULL)
                        vput(tvp);
                if (tdvp == tvp)
@@ -3838,7 +3838,7 @@ restart:
        if ((error = namei(&nd)) != 0)
                return (error);
        if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                vput(nd.ni_dvp);
                if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0)
                        return (error);
@@ -3857,7 +3857,7 @@ restart:
 #ifdef MAC
 out:
 #endif
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        VOP_VPUT_PAIR(nd.ni_dvp, error == 0 ? &nd.ni_vp : NULL, true);
        vn_finished_write(mp);
        if (error == ERELOOKUP)
@@ -3943,7 +3943,7 @@ restart:
                goto out;
 #endif
        if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
-               NDFREE(&nd, NDF_ONLY_PNBUF);
+               NDFREE_PNBUF(&nd);
                vput(vp);
                if (nd.ni_dvp == vp)
                        vrele(nd.ni_dvp);
@@ -3957,7 +3957,7 @@ restart:
        error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
        vn_finished_write(mp);
 out:
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        vput(vp);
        if (nd.ni_dvp == vp)
                vrele(nd.ni_dvp);
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 66fcbf80bb3a..4d75c53a701b 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -266,7 +266,7 @@ restart:
                        if (fmode & O_EXCL)
                                vap->va_vaflags |= VA_EXCLUSIVE;
                        if (vn_start_write(ndp->ni_dvp, &mp, V_NOWAIT) != 0) {
-                               NDFREE(ndp, NDF_ONLY_PNBUF);
+                               NDFREE_PNBUF(ndp);
                                vput(ndp->ni_dvp);
                                if ((error = vn_start_write(NULL, &mp,
                                    V_XSLEEP | PCATCH)) != 0)
@@ -295,7 +295,7 @@ restart:
                            false);
                        vn_finished_write(mp);
                        if (error) {
-                               NDFREE(ndp, NDF_ONLY_PNBUF);
+                               NDFREE_PNBUF(ndp);
                                if (error == ERELOOKUP) {
                                        NDREINIT(ndp);
                                        goto restart;
@@ -343,7 +343,7 @@ restart:
        *flagp = fmode;
        return (0);
 bad:
-       NDFREE(ndp, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(ndp);
        vput(vp);
        *flagp = fmode;
        ndp->ni_vp = NULL;
diff --git a/sys/security/audit/audit_syscalls.c 
b/sys/security/audit/audit_syscalls.c
index 0747d9499e27..86875d31c266 100644
--- a/sys/security/audit/audit_syscalls.c
+++ b/sys/security/audit/audit_syscalls.c
@@ -818,7 +818,7 @@ sys_auditctl(struct thread *td, struct auditctl_args *uap)
 #else
        VOP_UNLOCK(vp);
 #endif
-       NDFREE(&nd, NDF_ONLY_PNBUF);
+       NDFREE_PNBUF(&nd);
        if (vp->v_type != VREG) {
                vn_close(vp, AUDIT_CLOSE_FLAGS, td->td_ucred, td);
                return (EINVAL);
diff --git a/sys/security/mac_veriexec/mac_veriexec.c 
b/sys/security/mac_veriexec/mac_veriexec.c
index a11ee68766ec..7a5b747ef7a2 100644
--- a/sys/security/mac_veriexec/mac_veriexec.c
+++ b/sys/security/mac_veriexec/mac_veriexec.c
@@ -705,7 +705,7 @@ cleanup_file:
                error = namei(&nd);
                if (error != 0)
*** 116 LINES SKIPPED ***

Reply via email to