Lines Matching refs:vs

1757     fhandle_t *fhp, struct vfs_state *vs, accmode_t accmode)  in nlm_get_vfs_state()  argument
1763 memset(vs, 0, sizeof(*vs)); in nlm_get_vfs_state()
1765 vs->vs_mp = vfs_getvfs(&fhp->fh_fsid); in nlm_get_vfs_state()
1766 if (!vs->vs_mp) { in nlm_get_vfs_state()
1772 error = VFS_CHECKEXP(vs->vs_mp, in nlm_get_vfs_state()
1779 (vs->vs_mp->mnt_flag & MNT_RDONLY)) { in nlm_get_vfs_state()
1785 error = VFS_FHTOVP(vs->vs_mp, &fhp->fh_fid, LK_EXCLUSIVE, &vs->vs_vp); in nlm_get_vfs_state()
1788 vs->vs_vnlocked = TRUE; in nlm_get_vfs_state()
1804 error = VOP_ACCESS(vs->vs_vp, accmode, cred, curthread); in nlm_get_vfs_state()
1811 error = VOP_ACCESS(vs->vs_vp, VWRITE, cred, curthread); in nlm_get_vfs_state()
1816 VOP_UNLOCK(vs->vs_vp); in nlm_get_vfs_state()
1817 vs->vs_vnlocked = FALSE; in nlm_get_vfs_state()
1829 nlm_release_vfs_state(struct vfs_state *vs) in nlm_release_vfs_state() argument
1832 if (vs->vs_vp) { in nlm_release_vfs_state()
1833 if (vs->vs_vnlocked) in nlm_release_vfs_state()
1834 vput(vs->vs_vp); in nlm_release_vfs_state()
1836 vrele(vs->vs_vp); in nlm_release_vfs_state()
1838 if (vs->vs_mp) in nlm_release_vfs_state()
1839 vfs_rel(vs->vs_mp); in nlm_release_vfs_state()
1859 struct vfs_state vs; in nlm_do_test() local
1866 memset(&vs, 0, sizeof(vs)); in nlm_do_test()
1890 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_test()
1905 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_GETLK, &fl, F_REMOTE); in nlm_do_test()
1945 nlm_release_vfs_state(&vs); in nlm_do_test()
1957 struct vfs_state vs; in nlm_do_lock() local
1964 memset(&vs, 0, sizeof(vs)); in nlm_do_lock()
1997 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_lock()
2055 af->af_vp = vs.vs_vp; in nlm_do_lock()
2088 error = VOP_ADVLOCKASYNC(vs.vs_vp, NULL, F_SETLK, &fl, F_REMOTE, in nlm_do_lock()
2111 vs.vs_vp = NULL; in nlm_do_lock()
2114 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_SETLK, &fl, F_REMOTE); in nlm_do_lock()
2134 nlm_release_vfs_state(&vs); in nlm_do_lock()
2146 struct vfs_state vs; in nlm_do_cancel() local
2153 memset(&vs, 0, sizeof(vs)); in nlm_do_cancel()
2176 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_cancel()
2224 nlm_release_vfs_state(&vs); in nlm_do_cancel()
2236 struct vfs_state vs; in nlm_do_unlock() local
2242 memset(&vs, 0, sizeof(vs)); in nlm_do_unlock()
2265 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_unlock()
2277 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_UNLCK, &fl, F_REMOTE); in nlm_do_unlock()
2286 nlm_release_vfs_state(&vs); in nlm_do_unlock()