goto match;
/* unset, new portal */
- LNET_LOCK();
+ lnet_res_lock();
/* check again with lock */
if (unlikely(lnet_ptl_is_unique(ptl) || lnet_ptl_is_wildcard(ptl))) {
- LNET_UNLOCK();
+ lnet_res_unlock();
goto match;
}
else
lnet_ptl_setopt(ptl, LNET_PTL_MATCH_WILDCARD);
- LNET_UNLOCK();
+ lnet_res_unlock();
return 1;
unsigned int rlength, unsigned int roffset,
__u64 match_bits, lnet_libmd_t *md, lnet_msg_t *msg)
{
- /* ALWAYS called holding the LNET_LOCK, and can't LNET_UNLOCK;
+ /* ALWAYS called holding the lnet_res_lock, and can't lnet_res_unlock;
* lnet_match_blocked_msg() relies on this to avoid races */
unsigned int offset;
unsigned int mlength;
}
ptl = the_lnet.ln_portals[index];
- LNET_LOCK();
+ lnet_res_lock();
if (the_lnet.ln_shutdown) {
rc = LNET_MATCHMD_DROP;
op_mask == LNET_MD_OP_PUT ? "PUT" : "GET",
libcfs_id2str(src), index, match_bits, roffset, rlength);
out:
- LNET_UNLOCK();
+ lnet_res_unlock();
return rc;
}
md->md_me = NULL;
}
-/* called with LNET_LOCK held */
+/* called with lnet_res_lock held */
void
lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md,
cfs_list_t *matches, cfs_list_t *drops)
CDEBUG(D_NET, "Setting portal %d lazy\n", portal);
ptl = the_lnet.ln_portals[portal];
- LNET_LOCK();
+ lnet_res_lock();
lnet_ptl_setopt(ptl, LNET_PTL_LAZY);
- LNET_UNLOCK();
+ lnet_res_unlock();
return 0;
}
ptl = the_lnet.ln_portals[portal];
- LNET_LOCK();
+ lnet_res_lock();
if (!lnet_ptl_is_lazy(ptl)) {
- LNET_UNLOCK();
+ lnet_res_unlock();
return 0;
}
lnet_ptl_unsetopt(ptl, LNET_PTL_LAZY);
- LNET_UNLOCK();
+ lnet_res_unlock();
lnet_drop_delayed_msg_list(&zombies, "Clearing lazy portal attr");