Lines Matching refs:vp

94 	vnode_t *vp,  in fop_close()  argument
108 if ((vp->v_type == VREG) && (count == 1)) { in fop_close()
110 ASSERT(vp->v_rdcnt > 0); in fop_close()
111 atomic_add_32(&(vp->v_rdcnt), -1); in fop_close()
114 ASSERT(vp->v_wrcnt > 0); in fop_close()
115 atomic_add_32(&(vp->v_wrcnt), -1); in fop_close()
124 vnode_t *vp, in fop_read() argument
141 (void) fstat(vp->v_fd, &st); in fop_read()
200 n = pread(vp->v_fd, iov->iov_base, cnt, uio->uio_loffset); in fop_read()
219 vnode_t *vp, in fop_write() argument
243 n = pwrite(vp->v_fd, iov->iov_base, iov->iov_len, in fop_write()
256 (void) fsync(vp->v_fd); in fop_write()
265 vnode_t *vp, in fop_ioctl() argument
281 off = lseek(vp->v_fd, off, whence); in fop_ioctl()
301 vnode_t *vp, in fop_setfl() argument
314 vnode_t *vp, in fop_getattr() argument
323 if (fstat(vp->v_fd, &st) == -1) in fop_getattr()
328 (void) fop__getxvattr(vp, (xvattr_t *)vap); in fop_getattr()
336 vnode_t *vp, in fop_setattr() argument
346 if (ftruncate(vp->v_fd, vap->va_size) == -1) { in fop_setattr()
357 (void) fop__setxvattr(vp, (xvattr_t *)vap); in fop_setattr()
373 (void) futimens(vp->v_fd, times); in fop_setattr()
382 vnode_t *vp, in fop_access() argument
401 vnode_t *vp; in fake_lookup_xattrdir() local
429 vp = vn_alloc(KM_SLEEP); in fake_lookup_xattrdir()
430 vp->v_fd = fd; in fake_lookup_xattrdir()
431 vp->v_flag = V_XATTRDIR|V_SYSATTR; in fake_lookup_xattrdir()
432 vp->v_type = VDIR; in fake_lookup_xattrdir()
433 vp->v_vfsp = dvp->v_vfsp; in fake_lookup_xattrdir()
437 vp->v_path = kmem_alloc(len, KM_SLEEP); in fake_lookup_xattrdir()
438 (void) snprintf(vp->v_path, len, "%s/@", dvp->v_path); in fake_lookup_xattrdir()
444 vp->v_data = dvp; in fake_lookup_xattrdir()
449 *vpp = dvp->v_xattrdir = vp; in fake_lookup_xattrdir()
454 fake_inactive_xattrdir(vp); in fake_lookup_xattrdir()
476 vnode_t *vp; in fop_lookup() local
494 vp = vncache_lookup(&st); in fop_lookup()
495 if (vp != NULL) { in fop_lookup()
497 *vpp = vp; in fop_lookup()
520 vp = vncache_enter(&st, dvp, name, fd); in fop_lookup()
522 *vpp = vp; in fop_lookup()
541 vnode_t *vp; in fop_create() local
557 vp = NULL; in fop_create()
563 vp = vncache_lookup(&st); in fop_create()
567 if (vp == NULL) { in fop_create()
586 vp = vncache_enter(&st, dvp, name, fd); in fop_create()
591 if (vp == NULL) in fop_create()
594 if (vp->v_type == VDIR && vap->va_type != VDIR) { in fop_create()
595 vn_rele(vp); in fop_create()
598 if (vp->v_type != VDIR && vap->va_type == VDIR) { in fop_create()
599 vn_rele(vp); in fop_create()
606 (void) fop_setattr(vp, vap, 0, cr, ct); in fop_create()
608 *vpp = vp; in fop_create()
664 vnode_t *vp; in fop_rename() local
671 vp = vncache_lookup(&st); in fop_rename()
672 if (vp == NULL) in fop_rename()
679 vncache_renamed(vp, to_dvp, to_name); in fop_rename()
681 vn_rele(vp); in fop_rename()
744 vnode_t *vp, in fop_readdir() argument
754 int fd = vp->v_fd; in fop_readdir()
806 vnode_t *vp, in fop_readlink() argument
817 vnode_t *vp, in fop_fsync() argument
823 if (fsync(vp->v_fd) == -1) in fop_fsync()
832 vnode_t *vp, in fop_inactive() argument
836 if (vp->v_flag & V_XATTRDIR) { in fop_inactive()
837 fake_inactive_xattrdir(vp); in fop_inactive()
839 vncache_inactive(vp); in fop_inactive()
856 fake_inactive_xattrdir(vnode_t *vp) in fake_inactive_xattrdir() argument
858 vnode_t *dvp = vp->v_data; /* parent */ in fake_inactive_xattrdir()
860 mutex_enter(&vp->v_lock); in fake_inactive_xattrdir()
861 if (vp->v_count > 1) { in fake_inactive_xattrdir()
863 mutex_exit(&vp->v_lock); in fake_inactive_xattrdir()
867 ASSERT(dvp->v_xattrdir == vp); in fake_inactive_xattrdir()
869 mutex_exit(&vp->v_lock); in fake_inactive_xattrdir()
872 vn_free(vp); in fake_inactive_xattrdir()
878 vnode_t *vp, in fop_fid() argument
888 vnode_t *vp, in fop_rwlock() argument
899 vnode_t *vp, in fop_rwunlock() argument
909 vnode_t *vp, in fop_seek() argument
931 vnode_t *vp, in fop_frlock() argument
988 if (fcntl(vp->v_fd, cmd, bfp) == -1) in fop_frlock()
997 vnode_t *vp, in fop_space() argument
1015 if (fcntl(vp->v_fd, cmd, bfp) == -1) in fop_space()
1024 vnode_t *vp, in fop_realvp() argument
1034 vnode_t *vp, in fop_getpage() argument
1052 vnode_t *vp, in fop_putpage() argument
1065 vnode_t *vp, in fop_map() argument
1082 vnode_t *vp, in fop_addmap() argument
1099 vnode_t *vp, in fop_delmap() argument
1116 vnode_t *vp, in fop_poll() argument
1142 vnode_t *vp, in fop_dump() argument
1157 vnode_t *vp, in fop_pathconf() argument
1239 vnode_t *vp, in fop_pageio() argument
1253 vnode_t *vp, in fop_dumpctl() argument
1264 vnode_t *vp, in fop_dispose() argument
1276 vnode_t *vp, in fop_setsecattr() argument
1291 vnode_t *vp, in fop_getsecattr() argument
1337 vnode_t *vp, in fop_shrlock() argument
1357 if (fcntl(vp->v_fd, cmd, shr) == -1) in fop_shrlock()
1365 fop_vnevent(vnode_t *vp, vnevent_t vnevent, vnode_t *dvp, char *fnm, in fop_vnevent() argument
1373 fop_reqzcbuf(vnode_t *vp, enum uio_rw ioflag, xuio_t *xuio, cred_t *cr, in fop_reqzcbuf() argument
1391 if (fstat(vp->v_fd, &st) == -1) in fop_reqzcbuf()
1418 ma = mmap(NULL, mlen, PROT_READ, MAP_SHARED, vp->v_fd, moff); in fop_reqzcbuf()
1438 fop_retzcbuf(vnode_t *vp, xuio_t *xuio, cred_t *cr, caller_context_t *ct) in fop_retzcbuf() argument
1547 vn_hold(vnode_t *vp) in vn_hold() argument
1549 mutex_enter(&vp->v_lock); in vn_hold()
1550 vp->v_count++; in vn_hold()
1551 mutex_exit(&vp->v_lock); in vn_hold()
1555 vn_rele(vnode_t *vp) in vn_rele() argument
1557 VERIFY3U(vp->v_count, !=, 0); in vn_rele()
1558 mutex_enter(&vp->v_lock); in vn_rele()
1559 if (vp->v_count == 1) { in vn_rele()
1560 mutex_exit(&vp->v_lock); in vn_rele()
1561 fop_inactive(vp, NULL, NULL); in vn_rele()
1563 vp->v_count--; in vn_rele()
1564 mutex_exit(&vp->v_lock); in vn_rele()
1570 vnode_t *vp, in vn_has_other_opens() argument
1576 if (vp->v_wrcnt > 1) in vn_has_other_opens()
1580 if ((vp->v_rdcnt > 1) || (vp->v_wrcnt > 1)) in vn_has_other_opens()
1584 if ((vp->v_rdcnt > 1) && (vp->v_wrcnt > 1)) in vn_has_other_opens()
1588 if (vp->v_rdcnt > 1) in vn_has_other_opens()
1604 vnode_t *vp, in vn_is_opened() argument
1608 ASSERT(vp != NULL); in vn_is_opened()
1612 if (vp->v_wrcnt) in vn_is_opened()
1616 if (vp->v_rdcnt && vp->v_wrcnt) in vn_is_opened()
1620 if (vp->v_rdcnt || vp->v_wrcnt) in vn_is_opened()
1624 if (vp->v_rdcnt) in vn_is_opened()
1639 vnode_t *vp, in vn_is_mapped() argument