Home
last modified time | relevance | path

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

123

/freebsd-12-stable/sys/dev/veriexec/
Dverified_exec.c164 error = VOP_GETATTR(nid.ni_vp, &vattr, td->td_ucred); in verifiedexecioctl()
166 mac_veriexec_set_fingerprint_status(nid.ni_vp, in verifiedexecioctl()
168 VOP_UNLOCK(nid.ni_vp, 0); in verifiedexecioctl()
169 (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, in verifiedexecioctl()
178 if ((nid.ni_vp->v_mount->mnt_flag & in verifiedexecioctl()
188 mac_veriexec_set_fingerprint_status(nid.ni_vp, in verifiedexecioctl()
190 VOP_UNLOCK(nid.ni_vp, 0); in verifiedexecioctl()
191 (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, td); in verifiedexecioctl()
/freebsd-12-stable/sys/kern/
Dvfs_lookup.c384 ndp->ni_vp = NULL; in namei()
514 (error == 0 ? ndp->ni_vp : NULL)); in namei()
524 ndp->ni_vp); in namei()
542 error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred); in namei()
568 vput(ndp->ni_vp); in namei()
581 vput(ndp->ni_vp); in namei()
582 ndp->ni_vp = NULL; in namei()
818 ndp->ni_vp = dp; in lookup()
881 ndp->ni_vp = dp; in lookup()
922 ndp->ni_vp = NULL; in lookup()
[all …]
Dkern_ctf.c114 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, hdr, sizeof(*hdr),
136 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shdr, nbytes,
158 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, shstrtab,
177 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, ctf_hdr, sizeof(ctf_hdr),
240 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, raw == NULL ? ctftab : raw,
296 VOP_UNLOCK(nd.ni_vp, 0);
297 vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
Dvfs_syscalls.c203 mp = nd.ni_vp->v_mount; in sys_quotactl()
205 vput(nd.ni_vp); in sys_quotactl()
343 mp = nd.ni_vp->v_mount; in kern_statfs()
346 vput(nd.ni_vp); in kern_statfs()
918 if ((error = change_dir(nd.ni_vp, td)) != 0) { in kern_chdir()
919 vput(nd.ni_vp); in kern_chdir()
923 VOP_UNLOCK(nd.ni_vp, 0); in kern_chdir()
925 pwd_chdir(td, nd.ni_vp); in kern_chdir()
951 error = change_dir(nd.ni_vp, td); in sys_chroot()
955 error = mac_vnode_check_chroot(td->td_ucred, nd.ni_vp); in sys_chroot()
[all …]
Dvfs_extattr.c110 filename_vp = nd.ni_vp; in sys_extattrctl()
120 mp = nd.ni_vp->v_mount; in sys_extattrctl()
127 VOP_UNLOCK(nd.ni_vp, 0); in sys_extattrctl()
128 error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); in sys_extattrctl()
311 error = extattr_set_vp(nd.ni_vp, attrnamespace, attrname, data, in kern_extattr_set_path()
314 vrele(nd.ni_vp); in kern_extattr_set_path()
476 error = extattr_get_vp(nd.ni_vp, attrnamespace, attrname, data, in kern_extattr_get_path()
479 vrele(nd.ni_vp); in kern_extattr_get_path()
608 error = extattr_delete_vp(nd.ni_vp, attrnamespace, attrname, td); in kern_extattr_delete_path()
609 vrele(nd.ni_vp); in kern_extattr_delete_path()
[all …]
Dkern_acct.c227 error = mac_system_check_acct(td->td_ucred, nd.ni_vp); in sys_acct()
229 VOP_UNLOCK(nd.ni_vp, 0); in sys_acct()
230 vn_close(nd.ni_vp, flags, td->td_ucred, td); in sys_acct()
234 VOP_UNLOCK(nd.ni_vp, 0); in sys_acct()
235 if (nd.ni_vp->v_type != VREG) { in sys_acct()
236 vn_close(nd.ni_vp, flags, td->td_ucred, td); in sys_acct()
291 acct_vp = nd.ni_vp; in sys_acct()
Dlink_elf_obj.c665 if (nd->ni_vp->v_type != VREG) { in link_elf_load_file()
670 error = mac_kld_check_load(td->td_ucred, nd->ni_vp); in link_elf_load_file()
678 error = vn_rdwr(UIO_READ, nd->ni_vp, (void *)hdr, sizeof(*hdr), 0, in link_elf_load_file()
735 error = vn_rdwr(UIO_READ, nd->ni_vp, (caddr_t)shdr, nbytes, in link_elf_load_file()
823 error = vn_rdwr(UIO_READ, nd->ni_vp, (void *)ef->ddbsymtab, in link_elf_load_file()
837 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->ddbstrtab, in link_elf_load_file()
856 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->shstrtab, in link_elf_load_file()
1014 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file()
1057 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file()
1078 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file()
[all …]
Dkern_linker.c1797 type = nd.ni_vp->v_type; in linker_lookup_file()
1799 VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); in linker_lookup_file()
1800 VOP_UNLOCK(nd.ni_vp, 0); in linker_lookup_file()
1801 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in linker_lookup_file()
1847 if (nd.ni_vp->v_type != VREG) in linker_hints_lookup()
1850 error = VOP_GETATTR(nd.ni_vp, &vattr, cred); in linker_hints_lookup()
1861 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)hints, vattr.va_size, 0, in linker_hints_lookup()
1865 VOP_UNLOCK(nd.ni_vp, 0); in linker_hints_lookup()
1866 vn_close(nd.ni_vp, FREAD, cred, td); in linker_hints_lookup()
1867 nd.ni_vp = NULL; in linker_hints_lookup()
[all …]
Dlink_elf.c866 if (nd.ni_vp->v_type != VREG) { in link_elf_load_file()
872 error = mac_kld_check_load(curthread->td_ucred, nd.ni_vp); in link_elf_load_file()
884 error = vn_rdwr(UIO_READ, nd.ni_vp, firstpage, PAGE_SIZE, 0, in link_elf_load_file()
1047 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
1083 VOP_UNLOCK(nd.ni_vp, 0); in link_elf_load_file()
1085 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in link_elf_load_file()
1128 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
1141 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shstrs, nbytes, in link_elf_load_file()
1169 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
1175 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file()
[all …]
Dvfs_acl.c384 error = vacl_get_acl(td, nd.ni_vp, type, aclp); in kern___acl_get_path()
422 error = vacl_set_acl(td, nd.ni_vp, type, aclp); in kern___acl_set_path()
498 error = vacl_delete(td, nd.ni_vp, type); in kern___acl_delete_path()
555 error = vacl_aclcheck(td, nd.ni_vp, type, aclp); in kern___acl_aclcheck_path()
Dvfs_mountroot.c374 vp = nd.ni_vp; in vfs_mountroot_shuffle()
399 vp = nd.ni_vp; in vfs_mountroot_shuffle()
733 vput(nd.ni_vp); in parse_mount_dev_present()
963 error = vn_rdwr(UIO_READ, nd.ni_vp, buf, len, ofs, in vfs_mountroot_readconf()
975 VOP_UNLOCK(nd.ni_vp, 0); in vfs_mountroot_readconf()
976 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in vfs_mountroot_readconf()
/freebsd-12-stable/sys/security/mac_veriexec_parser/
Dmac_veriexec_parser.c274 rc = VOP_GETATTR(nid.ni_vp, &va, curthread->td_ucred); in read_manifest()
282 UIO_READ, nid.ni_vp, data, in read_manifest()
294 VOP_UNLOCK(nid.ni_vp, 0); in read_manifest()
295 (void)vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); in read_manifest()
357 rc = VOP_GETATTR(nid.ni_vp, &va, curthread->td_ucred); in parse_entry()
371 VOP_UNLOCK(nid.ni_vp, 0); in parse_entry()
372 vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); in parse_entry()
/freebsd-12-stable/sys/dev/beri/virtio/
Dvirtio_block.c251 if (nd.ni_vp->v_type != VREG) { in open_file()
255 error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); in open_file()
259 if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { in open_file()
260 vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); in open_file()
261 if (nd.ni_vp->v_iflag & VI_DOOMED) { in open_file()
265 nd.ni_vp->v_vflag |= VV_MD; in open_file()
266 VOP_UNLOCK(nd.ni_vp, 0); in open_file()
268 sc->vnode = nd.ni_vp; in open_file()
/freebsd-12-stable/sys/fs/nfsserver/
Dnfs_nfsdport.c590 if (ndp->ni_vp && !lockleaf) in nfsvno_namei()
591 NFSVOPUNLOCK(ndp->ni_vp, 0); in nfsvno_namei()
622 error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred); in nfsvno_namei()
629 vput(ndp->ni_vp); in nfsvno_namei()
660 vput(ndp->ni_vp); in nfsvno_namei()
661 ndp->ni_vp = NULL; in nfsvno_namei()
677 ndp->ni_vp = NULL; in nfsvno_namei()
961 if (!error && ndp->ni_vp == NULL) { in nfsvno_createsub()
965 &ndp->ni_vp, &ndp->ni_cnd, &nvap->na_vattr); in nfsvno_createsub()
973 nfsrv_pnfscreate(ndp->ni_vp, &nvap->na_vattr, in nfsvno_createsub()
[all …]
Dnfs_nfsdstate.c7638 if (nd.ni_vp->v_type != VDIR) { in nfsrv_setdsserver()
7639 vput(nd.ni_vp); in nfsrv_setdsserver()
7643 if (strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, "nfs") != 0) { in nfsrv_setdsserver()
7644 vput(nd.ni_vp); in nfsrv_setdsserver()
7659 ds->nfsdev_dvp = nd.ni_vp; in nfsrv_setdsserver()
7660 ds->nfsdev_nmp = VFSTONFS(nd.ni_vp->v_mount); in nfsrv_setdsserver()
7661 NFSVOPUNLOCK(nd.ni_vp, 0); in nfsrv_setdsserver()
7674 if (nd.ni_vp->v_type != VDIR) { in nfsrv_setdsserver()
7675 vput(nd.ni_vp); in nfsrv_setdsserver()
7680 if (strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, "nfs") != 0) { in nfsrv_setdsserver()
[all …]
/freebsd-12-stable/sys/cddl/compat/opensolaris/kern/
Dopensolaris_kobj.c82 VOP_UNLOCK(nd.ni_vp, 0); in kobj_open_file_vnode()
83 return (nd.ni_vp); in kobj_open_file_vnode()
Dopensolaris_lookup.c60 *compvpp = nd.ni_vp; in lookupnameat()
/freebsd-12-stable/sys/dev/md/
Dmd.c1456 if (nd.ni_vp->v_type != VREG) { in mdcreate_vnode()
1460 error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); 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 (nd.ni_vp->v_iflag & VI_DOOMED) { in mdcreate_vnode()
1471 nd.ni_vp->v_vflag |= VV_MD; in mdcreate_vnode()
1472 VOP_UNLOCK(nd.ni_vp, 0); in mdcreate_vnode()
1483 sc->vnode = nd.ni_vp; in mdcreate_vnode()
1488 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in mdcreate_vnode()
1489 nd.ni_vp->v_vflag &= ~VV_MD; in mdcreate_vnode()
[all …]
/freebsd-12-stable/sys/dev/nand/
Dnandsim_swap.c165 VOP_UNLOCK(nd.ni_vp, 0); in swap_file_open()
167 swap->swap_vp = nd.ni_vp; in swap_file_open()
/freebsd-12-stable/sys/cddl/compat/opensolaris/sys/
Dvnode.h188 VOP_UNLOCK(nd.ni_vp, 0); in vn_openat()
189 *vpp = nd.ni_vp; in vn_openat()
/freebsd-12-stable/sys/security/mac/
Dmac_syscalls.c369 mac_vnode_copy_label(nd.ni_vp->v_label, intlabel); in kern___mac_get_path()
538 error = vn_start_write(nd.ni_vp, &mp, V_WAIT | PCATCH); in kern___mac_set_path()
540 error = vn_setlabel(nd.ni_vp, intlabel, in kern___mac_set_path()
/freebsd-12-stable/sys/security/mac_veriexec/
Dmac_veriexec.c688 error = mac_veriexec_check_vp(td->td_ucred, nd.ni_vp, VVERIFY); in mac_veriexec_syscall()
689 vput(nd.ni_vp); in mac_veriexec_syscall()
/freebsd-12-stable/sys/sys/
Dnamei.h88 struct vnode *ni_vp; /* vnode of result */ member
/freebsd-12-stable/sys/i386/ibcs2/
Dimgact_coff.c182 vp = nd.ni_vp; in coff_load_file()
290 vrele(nd.ni_vp); in coff_load_file()
/freebsd-12-stable/sys/fs/nfsclient/
Dnfs_clport.c1298 if (error == 0 && strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, in nfssvc_nfscl()
1300 vput(nd.ni_vp); in nfssvc_nfscl()
1306 nfscl_retopts(VFSTONFS(nd.ni_vp->v_mount), buf, in nfssvc_nfscl()
1308 vput(nd.ni_vp); in nfssvc_nfscl()

123