Lines Matching refs:nvp

375 			struct nlm_vhold *nvp;  in nlm_gc()  local
379 nvp = TAILQ_FIRST(&hostp->nh_vholds_list); in nlm_gc()
380 while (nvp != NULL) { in nlm_gc()
383 new_nvp = TAILQ_NEXT(nvp, nv_link); in nlm_gc()
395 if (nvp->nv_refcnt == 0 && in nlm_gc()
396 nvp->nv_vp->v_filocks == NULL && in nlm_gc()
397 nvp->nv_vp->v_shrlocks == NULL) { in nlm_gc()
398 nlm_vhold_destroy(hostp, nvp); in nlm_gc()
401 nvp = new_nvp; in nlm_gc()
1005 struct nlm_vhold *nvp, *new_nvp = NULL; in nlm_vhold_get() local
1008 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vhold_get()
1009 if (nvp != NULL) in nlm_vhold_get()
1021 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vhold_get()
1022 if (nvp == NULL) { in nlm_vhold_get()
1023 nvp = new_nvp; in nlm_vhold_get()
1026 TAILQ_INIT(&nvp->nv_slreqs); in nlm_vhold_get()
1027 nvp->nv_vp = vp; in nlm_vhold_get()
1028 nvp->nv_refcnt = 1; in nlm_vhold_get()
1029 VN_HOLD(nvp->nv_vp); in nlm_vhold_get()
1032 (mod_hash_key_t)vp, (mod_hash_val_t)nvp) == 0); in nlm_vhold_get()
1033 TAILQ_INSERT_TAIL(&hostp->nh_vholds_list, nvp, nv_link); in nlm_vhold_get()
1041 return (nvp); in nlm_vhold_get()
1048 nlm_vhold_release(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_release() argument
1050 if (nvp == NULL) in nlm_vhold_release()
1054 ASSERT(nvp->nv_refcnt > 0); in nlm_vhold_release()
1055 nvp->nv_refcnt--; in nlm_vhold_release()
1064 if (nvp->nv_refcnt == 0 && in nlm_vhold_release()
1065 nvp->nv_vp->v_filocks == NULL && in nlm_vhold_release()
1066 nvp->nv_vp->v_shrlocks == NULL) { in nlm_vhold_release()
1067 nlm_vhold_destroy(hostp, nvp); in nlm_vhold_release()
1079 nlm_vhold_clean(struct nlm_vhold *nvp, int sysid) in nlm_vhold_clean() argument
1081 cleanlocks(nvp->nv_vp, IGN_PID, sysid); in nlm_vhold_clean()
1082 cleanshares_by_sysid(nvp->nv_vp, sysid); in nlm_vhold_clean()
1086 nlm_vhold_destroy(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_destroy() argument
1090 ASSERT(nvp->nv_refcnt == 0); in nlm_vhold_destroy()
1091 ASSERT(TAILQ_EMPTY(&nvp->nv_slreqs)); in nlm_vhold_destroy()
1094 (mod_hash_key_t)nvp->nv_vp, in nlm_vhold_destroy()
1095 (mod_hash_val_t)&nvp) == 0); in nlm_vhold_destroy()
1097 TAILQ_REMOVE(&hostp->nh_vholds_list, nvp, nv_link); in nlm_vhold_destroy()
1098 VN_RELE(nvp->nv_vp); in nlm_vhold_destroy()
1099 nvp->nv_vp = NULL; in nlm_vhold_destroy()
1101 kmem_cache_free(nlm_vhold_cache, nvp); in nlm_vhold_destroy()
1113 nlm_vhold_busy(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_busy() argument
1120 if (nvp->nv_refcnt > 0) in nlm_vhold_busy()
1123 vp = nvp->nv_vp; in nlm_vhold_busy()
1136 struct nlm_vhold *nvp = (struct nlm_vhold *)datap; in nlm_vhold_ctor() local
1138 bzero(nvp, sizeof (*nvp)); in nlm_vhold_ctor()
1146 struct nlm_vhold *nvp = (struct nlm_vhold *)datap; in nlm_vhold_dtor() local
1148 ASSERT(nvp->nv_refcnt == 0); in nlm_vhold_dtor()
1149 ASSERT(TAILQ_EMPTY(&nvp->nv_slreqs)); in nlm_vhold_dtor()
1150 ASSERT(nvp->nv_vp == NULL); in nlm_vhold_dtor()
1156 struct nlm_vhold *nvp = NULL; in nlm_vhold_find_locked() local
1161 (mod_hash_val_t)&nvp); in nlm_vhold_find_locked()
1163 if (nvp != NULL) in nlm_vhold_find_locked()
1164 nvp->nv_refcnt++; in nlm_vhold_find_locked()
1166 return (nvp); in nlm_vhold_find_locked()
1263 struct nlm_vhold *nvp; in nlm_host_notify_server() local
1272 TAILQ_FOREACH(nvp, &hostp->nh_vholds_list, nv_link) { in nlm_host_notify_server()
1275 while ((slr = TAILQ_FIRST(&nvp->nv_slreqs)) != NULL) { in nlm_host_notify_server()
1276 TAILQ_REMOVE(&nvp->nv_slreqs, slr, nsr_link); in nlm_host_notify_server()
1287 nvp->nv_refcnt++; in nlm_host_notify_server()
1290 nlm_vhold_clean(nvp, hostp->nh_sysid); in nlm_host_notify_server()
1293 nvp->nv_refcnt--; in nlm_host_notify_server()
1445 struct nlm_vhold *nvp; in nlm_host_gc_vholds() local
1449 nvp = TAILQ_FIRST(&hostp->nh_vholds_list); in nlm_host_gc_vholds()
1450 while (nvp != NULL) { in nlm_host_gc_vholds()
1453 if (nlm_vhold_busy(hostp, nvp)) { in nlm_host_gc_vholds()
1454 nvp = TAILQ_NEXT(nvp, nv_link); in nlm_host_gc_vholds()
1458 nvp_tmp = TAILQ_NEXT(nvp, nv_link); in nlm_host_gc_vholds()
1459 nlm_vhold_destroy(hostp, nvp); in nlm_host_gc_vholds()
1460 nvp = nvp_tmp; in nlm_host_gc_vholds()
2092 nlm_slreq_register(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_register() argument
2099 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_register()
2108 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_register()
2114 TAILQ_INSERT_TAIL(&nvp->nv_slreqs, slr, nsr_link); in nlm_slreq_register()
2133 nlm_slreq_unregister(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_unregister() argument
2139 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_unregister()
2145 TAILQ_REMOVE(&nvp->nv_slreqs, slr, nsr_link); in nlm_slreq_unregister()
2156 nlm_slreq_find_locked(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_find_locked() argument
2162 TAILQ_FOREACH(slr, &nvp->nv_slreqs, nsr_link) { in nlm_slreq_find_locked()
2537 struct nlm_vhold *nvp; in nlm_vp_active() local
2551 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vp_active()
2553 if (nvp != NULL) { in nlm_vp_active()
2586 struct nlm_vhold *nvp; in nlm_zone_unexport() local
2597 TAILQ_FOREACH(nvp, &hostp->nh_vholds_list, nv_link) { in nlm_zone_unexport()
2600 nvp->nv_refcnt++; in nlm_zone_unexport()
2603 vp = nvp->nv_vp; in nlm_zone_unexport()
2614 nlm_vhold_clean(nvp, hostp->nh_sysid); in nlm_zone_unexport()
2618 nvp->nv_refcnt--; in nlm_zone_unexport()