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()
997 struct nlm_vhold *nvp, *new_nvp = NULL; in nlm_vhold_get() local
1000 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vhold_get()
1001 if (nvp != NULL) in nlm_vhold_get()
1013 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vhold_get()
1014 if (nvp == NULL) { in nlm_vhold_get()
1015 nvp = new_nvp; in nlm_vhold_get()
1018 TAILQ_INIT(&nvp->nv_slreqs); in nlm_vhold_get()
1019 nvp->nv_vp = vp; in nlm_vhold_get()
1020 nvp->nv_refcnt = 1; in nlm_vhold_get()
1021 VN_HOLD(nvp->nv_vp); in nlm_vhold_get()
1024 (mod_hash_key_t)vp, (mod_hash_val_t)nvp) == 0); in nlm_vhold_get()
1025 TAILQ_INSERT_TAIL(&hostp->nh_vholds_list, nvp, nv_link); in nlm_vhold_get()
1033 return (nvp); in nlm_vhold_get()
1040 nlm_vhold_release(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_release() argument
1042 if (nvp == NULL) in nlm_vhold_release()
1046 ASSERT(nvp->nv_refcnt > 0); in nlm_vhold_release()
1047 nvp->nv_refcnt--; in nlm_vhold_release()
1056 if (nvp->nv_refcnt == 0 && in nlm_vhold_release()
1057 nvp->nv_vp->v_filocks == NULL && in nlm_vhold_release()
1058 nvp->nv_vp->v_shrlocks == NULL) { in nlm_vhold_release()
1059 nlm_vhold_destroy(hostp, nvp); in nlm_vhold_release()
1071 nlm_vhold_clean(struct nlm_vhold *nvp, int sysid) in nlm_vhold_clean() argument
1073 cleanlocks(nvp->nv_vp, IGN_PID, sysid); in nlm_vhold_clean()
1074 cleanshares_by_sysid(nvp->nv_vp, sysid); in nlm_vhold_clean()
1078 nlm_vhold_destroy(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_destroy() argument
1082 ASSERT(nvp->nv_refcnt == 0); in nlm_vhold_destroy()
1083 ASSERT(TAILQ_EMPTY(&nvp->nv_slreqs)); in nlm_vhold_destroy()
1086 (mod_hash_key_t)nvp->nv_vp, in nlm_vhold_destroy()
1087 (mod_hash_val_t)&nvp) == 0); in nlm_vhold_destroy()
1089 TAILQ_REMOVE(&hostp->nh_vholds_list, nvp, nv_link); in nlm_vhold_destroy()
1090 VN_RELE(nvp->nv_vp); in nlm_vhold_destroy()
1091 nvp->nv_vp = NULL; in nlm_vhold_destroy()
1093 kmem_cache_free(nlm_vhold_cache, nvp); in nlm_vhold_destroy()
1105 nlm_vhold_busy(struct nlm_host *hostp, struct nlm_vhold *nvp) in nlm_vhold_busy() argument
1112 if (nvp->nv_refcnt > 0) in nlm_vhold_busy()
1115 vp = nvp->nv_vp; in nlm_vhold_busy()
1128 struct nlm_vhold *nvp = (struct nlm_vhold *)datap; in nlm_vhold_ctor() local
1130 bzero(nvp, sizeof (*nvp)); in nlm_vhold_ctor()
1138 struct nlm_vhold *nvp = (struct nlm_vhold *)datap; in nlm_vhold_dtor() local
1140 ASSERT(nvp->nv_refcnt == 0); in nlm_vhold_dtor()
1141 ASSERT(TAILQ_EMPTY(&nvp->nv_slreqs)); in nlm_vhold_dtor()
1142 ASSERT(nvp->nv_vp == NULL); in nlm_vhold_dtor()
1148 struct nlm_vhold *nvp = NULL; in nlm_vhold_find_locked() local
1153 (mod_hash_val_t)&nvp); in nlm_vhold_find_locked()
1155 if (nvp != NULL) in nlm_vhold_find_locked()
1156 nvp->nv_refcnt++; in nlm_vhold_find_locked()
1158 return (nvp); in nlm_vhold_find_locked()
1255 struct nlm_vhold *nvp; in nlm_host_notify_server() local
1264 TAILQ_FOREACH(nvp, &hostp->nh_vholds_list, nv_link) { in nlm_host_notify_server()
1267 while ((slr = TAILQ_FIRST(&nvp->nv_slreqs)) != NULL) { in nlm_host_notify_server()
1268 TAILQ_REMOVE(&nvp->nv_slreqs, slr, nsr_link); in nlm_host_notify_server()
1279 nvp->nv_refcnt++; in nlm_host_notify_server()
1282 nlm_vhold_clean(nvp, hostp->nh_sysid); in nlm_host_notify_server()
1285 nvp->nv_refcnt--; in nlm_host_notify_server()
1437 struct nlm_vhold *nvp; in nlm_host_gc_vholds() local
1441 nvp = TAILQ_FIRST(&hostp->nh_vholds_list); in nlm_host_gc_vholds()
1442 while (nvp != NULL) { in nlm_host_gc_vholds()
1445 if (nlm_vhold_busy(hostp, nvp)) { in nlm_host_gc_vholds()
1446 nvp = TAILQ_NEXT(nvp, nv_link); in nlm_host_gc_vholds()
1450 nvp_tmp = TAILQ_NEXT(nvp, nv_link); in nlm_host_gc_vholds()
1451 nlm_vhold_destroy(hostp, nvp); in nlm_host_gc_vholds()
1452 nvp = nvp_tmp; in nlm_host_gc_vholds()
2084 nlm_slreq_register(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_register() argument
2091 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_register()
2100 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_register()
2106 TAILQ_INSERT_TAIL(&nvp->nv_slreqs, slr, nsr_link); in nlm_slreq_register()
2125 nlm_slreq_unregister(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_unregister() argument
2131 slr = nlm_slreq_find_locked(hostp, nvp, flp); in nlm_slreq_unregister()
2137 TAILQ_REMOVE(&nvp->nv_slreqs, slr, nsr_link); in nlm_slreq_unregister()
2148 nlm_slreq_find_locked(struct nlm_host *hostp, struct nlm_vhold *nvp, in nlm_slreq_find_locked() argument
2154 TAILQ_FOREACH(slr, &nvp->nv_slreqs, nsr_link) { in nlm_slreq_find_locked()
2529 struct nlm_vhold *nvp; in nlm_vp_active() local
2543 nvp = nlm_vhold_find_locked(hostp, vp); in nlm_vp_active()
2545 if (nvp != NULL) { in nlm_vp_active()
2575 struct nlm_vhold *nvp; in nlm_unexport() local
2586 TAILQ_FOREACH(nvp, &hostp->nh_vholds_list, nv_link) { in nlm_unexport()
2589 nvp->nv_refcnt++; in nlm_unexport()
2592 vp = nvp->nv_vp; in nlm_unexport()
2603 nlm_vhold_clean(nvp, hostp->nh_sysid); in nlm_unexport()
2607 nvp->nv_refcnt--; in nlm_unexport()