/freebsd/sys/dev/veriexec/ |
H A D | verified_exec.c | 216 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 D | vfs_lookup.c | 472 ndp->ni_vp = dp; in namei_emptypath() 628 ndp->ni_vp = NULL; in namei() 733 vput(ndp->ni_vp); in namei() 754 vput(ndp->ni_vp); in namei() 755 ndp->ni_vp = NULL; in namei() 848 ndp->ni_vp = dp; in vfs_lookup_degenerate() 883 vrele(ndp->ni_vp); in vfs_lookup_failifexists() 885 ndp->ni_vp = NULL; in vfs_lookup_failifexists() 900 dp = ndp->ni_vp; in vfs_lookup_cross_mount() 1338 dp = ndp->ni_vp; in vfs_lookup() [all …]
|
H A D | kern_ctf.c | 114 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 D | vfs_extattr.c | 108 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() 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() 521 vrele(nd.ni_vp); in kern_extattr_get_path() 671 vrele(nd.ni_vp); in kern_extattr_delete_path() 848 error = extattr_list_vp(nd.ni_vp, attrnamespace, auiop, td); in kern_extattr_list_path() [all …]
|
H A D | vfs_syscalls.c | 208 vput(nd.ni_vp); in sys_quotactl() 340 vrele(nd.ni_vp); in kern_statfs() 1015 vput(nd.ni_vp); in sys_chroot() 1205 vp = nd.ni_vp; in openatfp() 1389 vp = nd.ni_vp; in kern_mknodat() 1846 if (nd.ni_vp) in sys_undelete() 1956 vp = nd.ni_vp; in kern_funlinkat() 2179 vp = nd.ni_vp; in kern_accessat() 2685 vp = nd.ni_vp; in kern_readlinkat() 3492 vp = nd.ni_vp; in kern_truncate() [all …]
|
H A D | kern_acct.c | 221 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 D | subr_firmware.c | 303 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 D | vfs_acl.c | 379 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()
|
H A D | link_elf_obj.c | 753 if (nd->ni_vp->v_type != VREG) { in link_elf_load_file() 758 error = mac_kld_check_load(td->td_ucred, nd->ni_vp); in link_elf_load_file() 927 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->ddbstrtab, in link_elf_load_file() 946 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->shstrtab, in link_elf_load_file() 1133 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() 1196 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file() 1242 VOP_UNLOCK(nd->ni_vp); in link_elf_load_file() 1244 vn_lock(nd->ni_vp, LK_EXCLUSIVE | LK_RETRY); in link_elf_load_file() 1270 VOP_UNLOCK(nd->ni_vp); in link_elf_load_file() [all …]
|
H A D | kern_linker.c | 1955 type = nd.ni_vp->v_type; in linker_lookup_file() 1957 VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); in linker_lookup_file() 1958 VOP_UNLOCK(nd.ni_vp); in linker_lookup_file() 2006 if (nd.ni_vp->v_type != VREG) in linker_hints_lookup() 2009 error = VOP_GETATTR(nd.ni_vp, &vattr, cred); in linker_hints_lookup() 2024 VOP_UNLOCK(nd.ni_vp); in linker_hints_lookup() 2025 vn_close(nd.ni_vp, FREAD, cred, td); in linker_hints_lookup() 2026 nd.ni_vp = NULL; in linker_hints_lookup() 2091 if (nd.ni_vp != NULL) { in linker_hints_lookup() 2092 VOP_UNLOCK(nd.ni_vp); in linker_hints_lookup() [all …]
|
H A D | vfs_mountroot.c | 359 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 D | link_elf.c | 1014 if (nd.ni_vp->v_type != VREG) { in link_elf_load_file() 1020 error = mac_kld_check_load(curthread->td_ucred, nd.ni_vp); in link_elf_load_file() 1032 error = vn_rdwr(UIO_READ, nd.ni_vp, firstpage, PAGE_SIZE, 0, in link_elf_load_file() 1195 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file() 1223 VOP_UNLOCK(nd.ni_vp); in link_elf_load_file() 1225 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in link_elf_load_file() 1268 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() 1315 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file() 1340 VOP_UNLOCK(nd.ni_vp); in link_elf_load_file() [all …]
|
/freebsd/sys/security/mac_veriexec_parser/ |
H A D | mac_veriexec_parser.c | 270 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() 353 rc = VOP_GETATTR(nid.ni_vp, &va, curthread->td_ucred); in parse_entry() 369 VOP_UNLOCK(nid.ni_vp); in parse_entry() 370 vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); in parse_entry()
|
/freebsd/sys/dev/beri/virtio/ |
H A D | virtio_block.c | 247 if (nd.ni_vp->v_type != VREG) { in open_file() 251 error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); in open_file() 255 if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { in open_file() 256 vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); in open_file() 257 if (VN_IS_DOOMED(nd.ni_vp)) { in open_file() 261 nd.ni_vp->v_vflag |= VV_MD; in open_file() 262 VOP_UNLOCK(nd.ni_vp); in open_file() 264 sc->vnode = nd.ni_vp; in open_file()
|
/freebsd/sys/security/mac_veriexec/ |
H A D | mac_veriexec.c | 859 nd.ni_vp = NULL; in mac_veriexec_syscall() 944 error = mac_veriexec_check_vp(td->td_ucred, nd.ni_vp, VVERIFY); in mac_veriexec_syscall() 969 textvp = nd.ni_vp; in mac_veriexec_syscall() 1014 if (nd.ni_vp != NULL) { in mac_veriexec_syscall() 1015 VOP_UNLOCK(nd.ni_vp); in mac_veriexec_syscall() 1016 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in mac_veriexec_syscall()
|
/freebsd/sys/fs/nfsserver/ |
H A D | nfs_nfsdport.c | 774 vput(ndp->ni_vp); in nfsvno_namei() 1296 if (ndp->ni_vp) { in nfsvno_mknod() 1377 if (ndp->ni_vp) { in nfsvno_symlink() 1462 vp = ndp->ni_vp; in nfsvno_removesub() 1495 vp = ndp->ni_vp; in nfsvno_rmdirsub() 1664 xp = ndp->ni_vp; in nfsvno_link() 1692 if (ndp->ni_vp) in nfsvno_link() 1907 vp = ndp->ni_vp; in nfsvno_open() 1954 if (ndp->ni_vp) in nfsvno_open() 3518 vrele(nd.ni_vp); in nfsrv_v4rootexport() [all …]
|
H A D | nfs_nfsdstate.c | 7752 vput(nd.ni_vp); in nfsrv_setdsserver() 7757 vput(nd.ni_vp); in nfsrv_setdsserver() 7788 vput(nd.ni_vp); in nfsrv_setdsserver() 7794 vput(nd.ni_vp); in nfsrv_setdsserver() 7816 vput(nd.ni_vp); in nfsrv_setdsserver() 7823 vput(nd.ni_vp); in nfsrv_setdsserver() 7830 vput(nd.ni_vp); in nfsrv_setdsserver() 8675 vput(nd.ni_vp); in nfsrv_mdscopymr() 8679 vp = nd.ni_vp; in nfsrv_mdscopymr() 8737 if (nd.ni_vp->v_type != VDIR || nd.ni_vp == curvp) { in nfsrv_mdscopymr() [all …]
|
/freebsd/sys/security/mac/ |
H A D | mac_syscalls.c | 367 mac_vnode_copy_label(nd.ni_vp->v_label, intlabel); in kern___mac_get_path() 370 vput(nd.ni_vp); in kern___mac_get_path() 538 error = vn_start_write(nd.ni_vp, &mp, V_WAIT | V_PCATCH); in kern___mac_set_path() 540 error = vn_setlabel(nd.ni_vp, intlabel, in kern___mac_set_path() 544 vput(nd.ni_vp); in kern___mac_set_path()
|
/freebsd/sys/dev/md/ |
H A D | md.c | 1441 if (nd.ni_vp->v_type != VREG) { in mdcreate_vnode() 1455 if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { in mdcreate_vnode() 1456 vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); in mdcreate_vnode() 1457 if (VN_IS_DOOMED(nd.ni_vp)) { in mdcreate_vnode() 1463 nd.ni_vp->v_vflag |= VV_MD; in mdcreate_vnode() 1464 VOP_UNLOCK(nd.ni_vp); in mdcreate_vnode() 1476 sc->vnode = nd.ni_vp; in mdcreate_vnode() 1481 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in mdcreate_vnode() 1482 nd.ni_vp->v_vflag &= ~VV_MD; in mdcreate_vnode() 1489 VOP_UNLOCK(nd.ni_vp); in mdcreate_vnode() [all …]
|
/freebsd/sys/compat/linux/ |
H A D | linux_util.c | 92 pwd_altroot(td, nd.ni_vp); in linux_pwd_onexec() 93 vrele(nd.ni_vp); in linux_pwd_onexec()
|
H A D | linux_stats.c | 109 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 D | ffs_snapshot.c | 249 if (nd.ni_vp != NULL) { in ffs_snapshot() 250 vput(nd.ni_vp); in ffs_snapshot() 257 if (nd.ni_dvp == nd.ni_vp) in ffs_snapshot() 280 error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vat); in ffs_snapshot() 289 vp = nd.ni_vp; in ffs_snapshot() 296 vnode_create_vobject(nd.ni_vp, fs->fs_size, td); in ffs_snapshot() 885 (rmerr = VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd)) != 0) in ffs_snapshot() 891 if (nd.ni_vp != NULL) in ffs_snapshot() 892 vput(nd.ni_vp); in ffs_snapshot()
|
H A D | ffs_vfsops.c | 446 if (!vn_isdisk_error(ndp.ni_vp, &error)) { in ffs_mount() 447 vput(ndp.ni_vp); in ffs_mount() 458 error = VOP_ACCESS(ndp.ni_vp, accmode, td->td_ucred, td); in ffs_mount() 462 vput(ndp.ni_vp); in ffs_mount() 475 if ((error = ffs_mountfs(ndp.ni_vp, mp, td)) != 0) { in ffs_mount() 476 vrele(ndp.ni_vp); in ffs_mount() 493 if (ndp.ni_vp->v_rdev != ump->um_odevvp->v_rdev) in ffs_mount() 495 vput(ndp.ni_vp); in ffs_mount()
|
/freebsd/sys/sys/ |
H A D | namei.h | 89 struct vnode *ni_vp; /* vnode of result */ member
|
/freebsd/sys/fs/nfsclient/ |
H A D | nfs_clport.c | 1338 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()
|