Lines Matching refs:vs

1729     fhandle_t *fhp, struct vfs_state *vs, accmode_t accmode)  in nlm_get_vfs_state()  argument
1735 memset(vs, 0, sizeof(*vs)); in nlm_get_vfs_state()
1737 vs->vs_mp = vfs_getvfs(&fhp->fh_fsid); in nlm_get_vfs_state()
1738 if (!vs->vs_mp) { in nlm_get_vfs_state()
1744 error = VFS_CHECKEXP(vs->vs_mp, in nlm_get_vfs_state()
1751 (vs->vs_mp->mnt_flag & MNT_RDONLY)) { in nlm_get_vfs_state()
1757 error = VFS_FHTOVP(vs->vs_mp, &fhp->fh_fid, LK_EXCLUSIVE, &vs->vs_vp); in nlm_get_vfs_state()
1760 vs->vs_vnlocked = TRUE; in nlm_get_vfs_state()
1776 error = VOP_ACCESS(vs->vs_vp, accmode, cred, curthread); in nlm_get_vfs_state()
1783 error = VOP_ACCESS(vs->vs_vp, VWRITE, cred, curthread); in nlm_get_vfs_state()
1788 VOP_UNLOCK(vs->vs_vp); in nlm_get_vfs_state()
1789 vs->vs_vnlocked = FALSE; in nlm_get_vfs_state()
1801 nlm_release_vfs_state(struct vfs_state *vs) in nlm_release_vfs_state() argument
1804 if (vs->vs_vp) { in nlm_release_vfs_state()
1805 if (vs->vs_vnlocked) in nlm_release_vfs_state()
1806 vput(vs->vs_vp); in nlm_release_vfs_state()
1808 vrele(vs->vs_vp); in nlm_release_vfs_state()
1810 if (vs->vs_mp) in nlm_release_vfs_state()
1811 vfs_rel(vs->vs_mp); in nlm_release_vfs_state()
1831 struct vfs_state vs; in nlm_do_test() local
1838 memset(&vs, 0, sizeof(vs)); in nlm_do_test()
1862 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_test()
1877 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_GETLK, &fl, F_REMOTE); in nlm_do_test()
1917 nlm_release_vfs_state(&vs); in nlm_do_test()
1929 struct vfs_state vs; in nlm_do_lock() local
1936 memset(&vs, 0, sizeof(vs)); in nlm_do_lock()
1969 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_lock()
2027 af->af_vp = vs.vs_vp; in nlm_do_lock()
2060 error = VOP_ADVLOCKASYNC(vs.vs_vp, NULL, F_SETLK, &fl, F_REMOTE, in nlm_do_lock()
2083 vs.vs_vp = NULL; in nlm_do_lock()
2086 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_SETLK, &fl, F_REMOTE); in nlm_do_lock()
2106 nlm_release_vfs_state(&vs); in nlm_do_lock()
2118 struct vfs_state vs; in nlm_do_cancel() local
2125 memset(&vs, 0, sizeof(vs)); in nlm_do_cancel()
2148 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_cancel()
2196 nlm_release_vfs_state(&vs); in nlm_do_cancel()
2208 struct vfs_state vs; in nlm_do_unlock() local
2214 memset(&vs, 0, sizeof(vs)); in nlm_do_unlock()
2237 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_unlock()
2249 error = VOP_ADVLOCK(vs.vs_vp, NULL, F_UNLCK, &fl, F_REMOTE); in nlm_do_unlock()
2258 nlm_release_vfs_state(&vs); in nlm_do_unlock()