Home
last modified time | relevance | path

Searched refs:ni_vp (Results 1 – 25 of 54) sorted by relevance

123

/freebsd/sys/dev/veriexec/
H A Dverified_exec.c216 error = VOP_GETATTR(nid.ni_vp, &vattr, td->td_ucred); in verifiedexecioctl()
218 mac_veriexec_set_fingerprint_status(nid.ni_vp, in verifiedexecioctl()
220 VOP_UNLOCK(nid.ni_vp); in verifiedexecioctl()
221 (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, in verifiedexecioctl()
230 if ((nid.ni_vp->v_mount->mnt_flag & in verifiedexecioctl()
240 mac_veriexec_set_fingerprint_status(nid.ni_vp, in verifiedexecioctl()
242 VOP_UNLOCK(nid.ni_vp); in verifiedexecioctl()
243 (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, td); in verifiedexecioctl()
/freebsd/sys/kern/
H A Dvfs_lookup.c472 ndp->ni_vp = dp; in namei_emptypath()
484 SDT_PROBE4(vfs, namei, lookup, return, 0, ndp->ni_vp, false, ndp); in namei_follow_link()
513 error = mac_vnode_check_readlink(td->td_ucred, ndp->ni_vp); in namei_follow_link()
531 error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred); in namei_follow_link()
628 ndp->ni_vp = NULL; in namei()
724 ndp->ni_vp, false, ndp); in namei()
733 vput(ndp->ni_vp); in namei()
754 vput(ndp->ni_vp);
755 ndp->ni_vp = NULL;
848 ndp->ni_vp in vfs_lookup_degenerate()
[all...]
H A Dkern_ctf.c114 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, hdr, sizeof(*hdr), in link_elf_ctf_get()
136 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shdr, nbytes, in link_elf_ctf_get()
161 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, shstrtab, in link_elf_ctf_get()
182 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, &cth, sizeof(cth), in link_elf_ctf_get()
242 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, raw == NULL ? ctftab : raw, in link_elf_ctf_get()
290 VOP_UNLOCK(nd.ni_vp); in link_elf_ctf_get()
291 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in link_elf_ctf_get()
H A Dvfs_extattr.c108 filename_vp = nd.ni_vp; in sys_extattrctl()
118 mp = nd.ni_vp->v_mount; in sys_extattrctl()
121 vput(nd.ni_vp); in sys_extattrctl()
126 VOP_UNLOCK(nd.ni_vp); in sys_extattrctl()
127 error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | V_PCATCH); in sys_extattrctl()
128 vrele(nd.ni_vp); in sys_extattrctl()
332 error = extattr_set_vp(nd.ni_vp, attrnamespace, attrname, data, in kern_extattr_set_path()
335 vrele(nd.ni_vp); in kern_extattr_set_path()
518 error = extattr_get_vp(nd.ni_vp, attrnamespace, attrname, data, in kern_extattr_get_path()
521 vrele(nd.ni_vp); in kern_extattr_get_path()
[all …]
H A Dvfs_syscalls.c206 mp = nd.ni_vp->v_mount; in sys_quotactl()
208 vput(nd.ni_vp); in sys_quotactl()
339 mp = vfs_ref_from_vp(nd.ni_vp); in kern_statfs()
340 vrele(nd.ni_vp); in kern_statfs()
955 if ((error = change_dir(nd.ni_vp, td)) != 0) { in kern_chdir()
956 vput(nd.ni_vp); in kern_chdir()
960 VOP_UNLOCK(nd.ni_vp); in kern_chdir()
962 pwd_chdir(td, nd.ni_vp); in kern_chdir()
1029 error = kern_chroot(td, nd.ni_vp); in sys_chroot()
1245 vp = nd.ni_vp; in openatfp()
[all …]
H A Dkern_acct.c221 error = mac_system_check_acct(td->td_ucred, nd.ni_vp); in sys_acct()
223 VOP_UNLOCK(nd.ni_vp); in sys_acct()
224 vn_close(nd.ni_vp, flags, td->td_ucred, td); in sys_acct()
228 VOP_UNLOCK(nd.ni_vp); in sys_acct()
229 if (nd.ni_vp->v_type != VREG) { in sys_acct()
230 vn_close(nd.ni_vp, flags, td->td_ucred, td); in sys_acct()
276 acct_vp = nd.ni_vp; in sys_acct()
H A Dsubr_firmware.c303 if (nd.ni_vp->v_type != VREG) in try_binary_file()
305 error = VOP_GETATTR(nd.ni_vp, &vattr, cred); in try_binary_file()
318 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)data, vattr.va_size, 0, in try_binary_file()
321 VOP_UNLOCK(nd.ni_vp); in try_binary_file()
322 vn_close(nd.ni_vp, FREAD, cred, td); in try_binary_file()
323 nd.ni_vp = NULL; in try_binary_file()
337 VOP_UNLOCK(nd.ni_vp); in try_binary_file()
338 vn_close(nd.ni_vp, FREAD, cred, td); in try_binary_file()
H A Dvfs_acl.c379 error = vacl_get_acl(td, nd.ni_vp, type, aclp); in kern___acl_get_path()
380 vrele(nd.ni_vp); in kern___acl_get_path()
418 error = vacl_set_acl(td, nd.ni_vp, type, aclp); in kern___acl_set_path()
419 vrele(nd.ni_vp); in kern___acl_set_path()
495 error = vacl_delete(td, nd.ni_vp, type); in kern___acl_delete_path()
496 vrele(nd.ni_vp); in kern___acl_delete_path()
553 error = vacl_aclcheck(td, nd.ni_vp, type, aclp); in kern___acl_aclcheck_path()
554 vrele(nd.ni_vp); in kern___acl_aclcheck_path()
H A Dlink_elf_obj.c750 if (nd->ni_vp->v_type != VREG) { in link_elf_load_file()
755 error = mac_kld_check_load(td->td_ucred, nd->ni_vp); in link_elf_load_file()
763 error = vn_rdwr(UIO_READ, nd->ni_vp, (void *)hdr, sizeof(*hdr), 0, in link_elf_load_file()
820 error = vn_rdwr(UIO_READ, nd->ni_vp, (caddr_t)shdr, nbytes, in link_elf_load_file()
910 error = vn_rdwr(UIO_READ, nd->ni_vp, (void *)ef->ddbsymtab, in link_elf_load_file()
924 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->ddbstrtab, in link_elf_load_file()
943 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->shstrtab, in link_elf_load_file()
1130 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file()
1172 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file()
1193 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file()
[all …]
H A Dkern_linker.c1969 type = nd.ni_vp->v_type; in linker_lookup_file()
1971 VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); in linker_lookup_file()
1972 VOP_UNLOCK(nd.ni_vp); in linker_lookup_file()
1973 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in linker_lookup_file()
2020 if (nd.ni_vp->v_type != VREG) in linker_hints_lookup()
2023 error = VOP_GETATTR(nd.ni_vp, &vattr, cred); in linker_hints_lookup()
2038 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)hints, vattr.va_size, 0, in linker_hints_lookup()
2042 VOP_UNLOCK(nd.ni_vp); in linker_hints_lookup()
2043 vn_close(nd.ni_vp, FREAD, cred, td); in linker_hints_lookup()
2044 nd.ni_vp = NULL; in linker_hints_lookup()
[all …]
H A Dvfs_mountroot.c359 vp = nd.ni_vp; in vfs_mountroot_shuffle()
387 vp = nd.ni_vp; in vfs_mountroot_shuffle()
727 vrele(nd.ni_vp); in parse_mount_dev_present()
957 error = vn_rdwr(UIO_READ, nd.ni_vp, buf, len, ofs, in vfs_mountroot_readconf()
969 VOP_UNLOCK(nd.ni_vp); in vfs_mountroot_readconf()
970 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in vfs_mountroot_readconf()
H A Dlink_elf.c1008 if (nd.ni_vp->v_type != VREG) { in link_elf_load_file()
1014 error = mac_kld_check_load(curthread->td_ucred, nd.ni_vp); in link_elf_load_file()
1026 error = vn_rdwr(UIO_READ, nd.ni_vp, firstpage, PAGE_SIZE, 0, in link_elf_load_file()
1189 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
1217 VOP_UNLOCK(nd.ni_vp); in link_elf_load_file()
1219 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in link_elf_load_file()
1262 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
1275 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shstrs, nbytes, in link_elf_load_file()
1303 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
1309 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
[all …]
H A Dkern_alq.c454 VOP_UNLOCK(nd.ni_vp); in alq_open_flags()
457 alq->aq_vp = nd.ni_vp; in alq_open_flags()
/freebsd/sys/security/mac_veriexec_parser/
H A Dmac_veriexec_parser.c270 rc = VOP_GETATTR(nid.ni_vp, &va, curthread->td_ucred); in read_manifest()
278 UIO_READ, nid.ni_vp, data, in read_manifest()
290 VOP_UNLOCK(nid.ni_vp); in read_manifest()
291 (void)vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); in read_manifest()
352 rc = VOP_GETATTR(nid.ni_vp, &va, curthread->td_ucred); in parse_entry()
368 VOP_UNLOCK(nid.ni_vp); in parse_entry()
369 vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); in parse_entry()
/freebsd/sys/security/mac_veriexec/
H A Dmac_veriexec.c858 nd.ni_vp = NULL; in mac_veriexec_syscall()
943 error = mac_veriexec_check_vp(td->td_ucred, nd.ni_vp, VVERIFY); in mac_veriexec_syscall()
968 textvp = nd.ni_vp; in mac_veriexec_syscall()
1013 if (nd.ni_vp != NULL) { in mac_veriexec_syscall()
1014 VOP_UNLOCK(nd.ni_vp); in mac_veriexec_syscall()
1015 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in mac_veriexec_syscall()
/freebsd/sys/fs/nfsserver/
H A Dnfs_nfsdport.c735 if (ndp->ni_vp && !lockleaf) in nfsvno_namei()
736 NFSVOPUNLOCK(ndp->ni_vp); in nfsvno_namei()
767 error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred); in nfsvno_namei()
774 vput(ndp->ni_vp); in nfsvno_namei()
805 vput(ndp->ni_vp); in nfsvno_namei()
806 ndp->ni_vp = NULL; in nfsvno_namei()
822 ndp->ni_vp = NULL; in nfsvno_namei()
1218 if (!error && ndp->ni_vp == NULL) { in nfsvno_createsub()
1221 &ndp->ni_vp, &ndp->ni_cnd, &nvap->na_vattr); in nfsvno_createsub()
1229 nfsrv_pnfscreate(ndp->ni_vp, &nvap->na_vattr, in nfsvno_createsub()
[all …]
H A Dnfs_nfsdstate.c7734 if (nd.ni_vp->v_type != VDIR) { in nfsrv_setdsserver()
7735 vput(nd.ni_vp); in nfsrv_setdsserver()
7739 if (strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, "nfs") != 0) { in nfsrv_setdsserver()
7740 vput(nd.ni_vp); in nfsrv_setdsserver()
7755 ds->nfsdev_dvp = nd.ni_vp; in nfsrv_setdsserver()
7756 ds->nfsdev_nmp = VFSTONFS(nd.ni_vp->v_mount); in nfsrv_setdsserver()
7757 NFSVOPUNLOCK(nd.ni_vp); in nfsrv_setdsserver()
7770 if (nd.ni_vp->v_type != VDIR) { in nfsrv_setdsserver()
7771 vput(nd.ni_vp); in nfsrv_setdsserver()
7776 if (strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, "nfs") != 0) { in nfsrv_setdsserver()
[all …]
/freebsd/sys/security/mac/
H A Dmac_syscalls.c469 mac_vnode_copy_label(nd.ni_vp->v_label, intlabel); in kern___mac_get_path()
472 vput(nd.ni_vp); in kern___mac_get_path()
616 error = vn_start_write(nd.ni_vp, &mp, V_WAIT | V_PCATCH); in kern___mac_set_path()
618 error = vn_setlabel(nd.ni_vp, intlabel, in kern___mac_set_path()
622 vput(nd.ni_vp); in kern___mac_set_path()
/freebsd/sys/dev/md/
H A Dmd.c1449 if (nd.ni_vp->v_type != VREG) { in mdcreate_vnode()
1453 error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); in mdcreate_vnode()
1457 error = VOP_PATHCONF(nd.ni_vp, _PC_DEALLOC_PRESENT, &v); in mdcreate_vnode()
1463 if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { in mdcreate_vnode()
1464 vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); in mdcreate_vnode()
1465 if (VN_IS_DOOMED(nd.ni_vp)) { in mdcreate_vnode()
1471 nd.ni_vp->v_vflag |= VV_MD; in mdcreate_vnode()
1472 VOP_UNLOCK(nd.ni_vp); in mdcreate_vnode()
1484 sc->vnode = nd.ni_vp; in mdcreate_vnode()
1489 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in mdcreate_vnode()
[all …]
/freebsd/sys/compat/linux/
H A Dlinux_util.c92 pwd_altroot(td, nd.ni_vp); in linux_pwd_onexec()
93 vrele(nd.ni_vp); in linux_pwd_onexec()
H A Dlinux_stats.c109 error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); in linux_kern_statat()
111 translate_vnhook_major_minor(nd.ni_vp, sbp); in linux_kern_statat()
113 vput(nd.ni_vp); in linux_kern_statat()
/freebsd/sys/ufs/ffs/
H A Dffs_vfsops.c450 if (!vn_isdisk_error(ndp.ni_vp, &error)) { in ffs_mount()
451 vput(ndp.ni_vp); in ffs_mount()
462 error = VOP_ACCESS(ndp.ni_vp, accmode, td->td_ucred, td); in ffs_mount()
466 vput(ndp.ni_vp); in ffs_mount()
479 if ((error = ffs_mountfs(ndp.ni_vp, mp, td)) != 0) { in ffs_mount()
480 vrele(ndp.ni_vp); in ffs_mount()
497 if (ndp.ni_vp->v_rdev != ump->um_odevvp->v_rdev) in ffs_mount()
499 vput(ndp.ni_vp); in ffs_mount()
H A Dffs_snapshot.c258 if (nd.ni_vp != NULL) { in ffs_snapshot()
259 vput(nd.ni_vp); in ffs_snapshot()
266 if (nd.ni_dvp == nd.ni_vp) in ffs_snapshot()
289 error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vat); in ffs_snapshot()
298 vp = nd.ni_vp; in ffs_snapshot()
305 vnode_create_vobject(nd.ni_vp, fs->fs_size, td); in ffs_snapshot()
894 (rmerr = VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd)) != 0) in ffs_snapshot()
900 if (nd.ni_vp != NULL) in ffs_snapshot()
901 vput(nd.ni_vp); in ffs_snapshot()
/freebsd/sys/sys/
H A Dnamei.h89 struct vnode *ni_vp; /* vnode of result */ member
/freebsd/sys/fs/nfsclient/
H A Dnfs_clport.c1338 if (error == 0 && strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, in nfssvc_nfscl()
1340 vput(nd.ni_vp); in nfssvc_nfscl()
1346 nfscl_retopts(VFSTONFS(nd.ni_vp->v_mount), buf, in nfssvc_nfscl()
1348 vput(nd.ni_vp); in nfssvc_nfscl()

123