Lines Matching full:vs

1752     fhandle_t *fhp, struct vfs_state *vs, accmode_t accmode)  in nlm_get_vfs_state()  argument
1758 memset(vs, 0, sizeof(*vs)); in nlm_get_vfs_state()
1760 vs->vs_mp = vfs_getvfs(&fhp->fh_fsid); in nlm_get_vfs_state()
1761 if (!vs->vs_mp) { in nlm_get_vfs_state()
1767 error = VFS_CHECKEXP(vs->vs_mp, in nlm_get_vfs_state()
1774 (vs->vs_mp->mnt_flag & MNT_RDONLY)) { in nlm_get_vfs_state()
1780 error = VFS_FHTOVP(vs->vs_mp, &fhp->fh_fid, LK_EXCLUSIVE, &vs->vs_vp); in nlm_get_vfs_state()
1783 vs->vs_vnlocked = TRUE; in nlm_get_vfs_state()
1799 error = VOP_ACCESS(vs->vs_vp, accmode, cred, curthread); in nlm_get_vfs_state()
1806 error = VOP_ACCESS(vs->vs_vp, VWRITE, cred, curthread); in nlm_get_vfs_state()
1811 VOP_UNLOCK(vs->vs_vp); in nlm_get_vfs_state()
1812 vs->vs_vnlocked = FALSE; in nlm_get_vfs_state()
1824 nlm_release_vfs_state(struct vfs_state *vs) in nlm_release_vfs_state() argument
1827 if (vs->vs_vp) { in nlm_release_vfs_state()
1828 if (vs->vs_vnlocked) in nlm_release_vfs_state()
1829 vput(vs->vs_vp); in nlm_release_vfs_state()
1831 vrele(vs->vs_vp); in nlm_release_vfs_state()
1833 if (vs->vs_mp) in nlm_release_vfs_state()
1834 vfs_rel(vs->vs_mp); in nlm_release_vfs_state()
1854 struct vfs_state vs; in nlm_do_test() local
1861 memset(&vs, 0, sizeof(vs)); in nlm_do_test()
1885 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_test()
1900 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_GETLK, &fl, F_REMOTE); in nlm_do_test()
1940 nlm_release_vfs_state(&vs); in nlm_do_test()
1952 struct vfs_state vs; in nlm_do_lock() local
1959 memset(&vs, 0, sizeof(vs)); in nlm_do_lock()
1992 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_lock()
2050 af->af_vp = vs.vs_vp; in nlm_do_lock()
2083 error = VOP_ADVLOCKASYNC(vs.vs_vp, NULL, F_SETLK, &fl, F_REMOTE, in nlm_do_lock()
2106 vs.vs_vp = NULL; in nlm_do_lock()
2109 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_SETLK, &fl, F_REMOTE); in nlm_do_lock()
2129 nlm_release_vfs_state(&vs); in nlm_do_lock()
2141 struct vfs_state vs; in nlm_do_cancel() local
2148 memset(&vs, 0, sizeof(vs)); in nlm_do_cancel()
2171 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_cancel()
2219 nlm_release_vfs_state(&vs); in nlm_do_cancel()
2231 struct vfs_state vs; in nlm_do_unlock() local
2237 memset(&vs, 0, sizeof(vs)); in nlm_do_unlock()
2260 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_unlock()
2272 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_UNLCK, &fl, F_REMOTE); in nlm_do_unlock()
2281 nlm_release_vfs_state(&vs); in nlm_do_unlock()