Lines Matching defs:nsp
2184 struct nlm_shres *nsp, *nsp_new;
2194 for (nsp = hostp->nh_shrlist; nsp != NULL; nsp = nsp->ns_next)
2195 if (nsp->ns_vp == vp && nlm_shres_equal(shrp, nsp->ns_shr))
2198 if (nsp != NULL) {
2206 nsp = nsp_new;
2208 nsp->ns_next = hostp->nh_shrlist;
2209 hostp->nh_shrlist = nsp;
2220 struct nlm_shres *nsp, *nsp_prev = NULL;
2223 nsp = hostp->nh_shrlist;
2224 while (nsp != NULL) {
2225 if (nsp->ns_vp == vp && nlm_shres_equal(shrp, nsp->ns_shr)) {
2228 nsp_del = nsp;
2229 nsp = nsp->ns_next;
2231 nsp_prev->ns_next = nsp;
2233 hostp->nh_shrlist = nsp;
2239 nsp_prev = nsp;
2240 nsp = nsp->ns_next;
2255 struct nlm_shres *nsp, *nslist = NULL;
2258 for (nsp = hostp->nh_shrlist; nsp != NULL; nsp = nsp->ns_next) {
2261 nsp_new = nlm_shres_create_item(nsp->ns_shr, nsp->ns_vp);
2277 struct nlm_shres *nsp;
2280 nsp = nslist;
2283 nlm_shres_destroy_item(nsp);
2303 struct nlm_shres *nsp;
2305 nsp = kmem_alloc(sizeof (*nsp), KM_SLEEP);
2306 nsp->ns_shr = kmem_alloc(sizeof (*shrp), KM_SLEEP);
2307 bcopy(shrp, nsp->ns_shr, sizeof (*shrp));
2308 nsp->ns_shr->s_owner = kmem_alloc(shrp->s_own_len, KM_SLEEP);
2309 bcopy(shrp->s_owner, nsp->ns_shr->s_owner, shrp->s_own_len);
2310 nsp->ns_vp = vp;
2312 return (nsp);
2316 nlm_shres_destroy_item(struct nlm_shres *nsp)
2318 kmem_free(nsp->ns_shr->s_owner,
2319 nsp->ns_shr->s_own_len);
2320 kmem_free(nsp->ns_shr, sizeof (struct shrlock));
2321 kmem_free(nsp, sizeof (*nsp));