aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/imgact_elf.c2
-rw-r--r--sys/kern/kern_acct.c2
-rw-r--r--sys/kern/kern_alq.c2
-rw-r--r--sys/kern/kern_ctf.c2
-rw-r--r--sys/kern/kern_exec.c4
-rw-r--r--sys/kern/kern_jail.c2
-rw-r--r--sys/kern/kern_ktrace.c2
-rw-r--r--sys/kern/kern_linker.c4
-rw-r--r--sys/kern/kern_proc.c2
-rw-r--r--sys/kern/kern_sig.c4
-rw-r--r--sys/kern/link_elf.c2
-rw-r--r--sys/kern/link_elf_obj.c2
-rw-r--r--sys/kern/uipc_usrreq.c4
-rw-r--r--sys/kern/vfs_cache.c2
-rw-r--r--sys/kern/vfs_default.c2
-rw-r--r--sys/kern/vfs_extattr.c8
-rw-r--r--sys/kern/vfs_lookup.c6
-rw-r--r--sys/kern/vfs_mount.c4
-rw-r--r--sys/kern/vfs_mountroot.c10
-rw-r--r--sys/kern/vfs_syscalls.c72
-rw-r--r--sys/kern/vfs_vnops.c6
21 files changed, 72 insertions, 72 deletions
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;