Lines Matching refs:nvp
959 struct nlm_vhold *nvp, *new_nvp = NULL; in nlm_vhold_get() local
962 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vhold_get()
963 if (nvp != NULL) in nlm_vhold_get()
975 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vhold_get()
976 if (nvp == NULL) { in nlm_vhold_get()
977 nvp = new_nvp; in nlm_vhold_get()
980 TAILQ_INIT(&nvp->nv_slreqs); in nlm_vhold_get()
981 nvp->nv_vp = vp; in nlm_vhold_get()
982 nvp->nv_refcnt = 1; in nlm_vhold_get()
983 VN_HOLD(nvp->nv_vp); in nlm_vhold_get()
986 (mod_hash_key_t)vp, (mod_hash_val_t)nvp) == 0); in nlm_vhold_get()
987 TAILQ_INSERT_TAIL(&hostp->nh_vholds_list, nvp, nv_link); in nlm_vhold_get()
995 return (nvp); in nlm_vhold_get()
1002 nlm_vhold_release(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_release() argument
1004 if (nvp == NULL) in nlm_vhold_release()
1008 ASSERT(nvp->nv_refcnt > 0); in nlm_vhold_release()
1009 nvp->nv_refcnt--; in nlm_vhold_release()
1019 nlm_vhold_clean(struct nlm_vhold *nvp, int sysid) in nlm_vhold_clean() argument
1021 cleanlocks(nvp->nv_vp, IGN_PID, sysid); in nlm_vhold_clean()
1022 cleanshares_by_sysid(nvp->nv_vp, sysid); in nlm_vhold_clean()
1026 nlm_vhold_destroy(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_destroy() argument
1031 (mod_hash_key_t)nvp->nv_vp, in nlm_vhold_destroy()
1032 (mod_hash_val_t)&nvp) == 0); in nlm_vhold_destroy()
1034 TAILQ_REMOVE(&hostp->nh_vholds_list, nvp, nv_link); in nlm_vhold_destroy()
1035 VN_RELE(nvp->nv_vp); in nlm_vhold_destroy()
1036 nvp->nv_vp = NULL; in nlm_vhold_destroy()
1038 kmem_cache_free(nlm_vhold_cache, nvp); in nlm_vhold_destroy()
1050 nlm_vhold_busy(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_busy() argument
1057 if (nvp->nv_refcnt > 0) in nlm_vhold_busy()
1060 vp = nvp->nv_vp; in nlm_vhold_busy()
1073 struct nlm_vhold *nvp = (struct nlm_vhold *)datap; in nlm_vhold_ctor() local
1075 bzero(nvp, sizeof (*nvp)); in nlm_vhold_ctor()
1083 struct nlm_vhold *nvp = (struct nlm_vhold *)datap; in nlm_vhold_dtor() local
1085 ASSERT(nvp->nv_refcnt == 0); in nlm_vhold_dtor()
1086 ASSERT(TAILQ_EMPTY(&nvp->nv_slreqs)); in nlm_vhold_dtor()
1087 ASSERT(nvp->nv_vp == NULL); in nlm_vhold_dtor()
1093 struct nlm_vhold *nvp = NULL; in nlm_vhold_find_locked() local
1098 (mod_hash_val_t)&nvp); in nlm_vhold_find_locked()
1100 if (nvp != NULL) in nlm_vhold_find_locked()
1101 nvp->nv_refcnt++; in nlm_vhold_find_locked()
1103 return (nvp); in nlm_vhold_find_locked()
1200 struct nlm_vhold *nvp; in nlm_host_notify_server() local
1209 TAILQ_FOREACH(nvp, &hostp->nh_vholds_list, nv_link) { in nlm_host_notify_server()
1212 while ((slr = TAILQ_FIRST(&nvp->nv_slreqs)) != NULL) { in nlm_host_notify_server()
1213 TAILQ_REMOVE(&nvp->nv_slreqs, slr, nsr_link); in nlm_host_notify_server()
1224 nvp->nv_refcnt++; in nlm_host_notify_server()
1227 nlm_vhold_clean(nvp, hostp->nh_sysid); in nlm_host_notify_server()
1230 nvp->nv_refcnt--; in nlm_host_notify_server()
1382 struct nlm_vhold *nvp; in nlm_host_gc_vholds() local
1386 nvp = TAILQ_FIRST(&hostp->nh_vholds_list); in nlm_host_gc_vholds()
1387 while (nvp != NULL) { in nlm_host_gc_vholds()
1390 if (nlm_vhold_busy(hostp, nvp)) { in nlm_host_gc_vholds()
1391 nvp = TAILQ_NEXT(nvp, nv_link); in nlm_host_gc_vholds()
1395 nvp_tmp = TAILQ_NEXT(nvp, nv_link); in nlm_host_gc_vholds()
1396 nlm_vhold_destroy(hostp, nvp); in nlm_host_gc_vholds()
1397 nvp = nvp_tmp; in nlm_host_gc_vholds()
2021 nlm_slreq_register(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_register() argument
2028 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_register()
2037 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_register()
2043 TAILQ_INSERT_TAIL(&nvp->nv_slreqs, slr, nsr_link); in nlm_slreq_register()
2062 nlm_slreq_unregister(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_unregister() argument
2068 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_unregister()
2074 TAILQ_REMOVE(&nvp->nv_slreqs, slr, nsr_link); in nlm_slreq_unregister()
2085 nlm_slreq_find_locked(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_find_locked() argument
2091 TAILQ_FOREACH(slr, &nvp->nv_slreqs, nsr_link) { in nlm_slreq_find_locked()
2466 struct nlm_vhold *nvp; in nlm_vp_active() local
2480 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vp_active()
2482 if (nvp != NULL) { in nlm_vp_active()
2512 struct nlm_vhold *nvp; in nlm_unexport() local
2515 TAILQ_FOREACH(nvp, &hostp->nh_vholds_list, nv_link) { in nlm_unexport()
2518 nvp->nv_refcnt++; in nlm_unexport()
2521 vp = nvp->nv_vp; in nlm_unexport()
2532 nlm_vhold_clean(nvp, hostp->nh_sysid); in nlm_unexport()
2536 nvp->nv_refcnt--; in nlm_unexport()