Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-6142 lnet: use list_first_entry() in lnet/lnet subdirectory.
[fs/lustre-release.git]
/
lnet
/
lnet
/
lib-ptl.c
diff --git
a/lnet/lnet/lib-ptl.c
b/lnet/lnet/lib-ptl.c
index
cbe7a30
..
4196424
100644
(file)
--- a/
lnet/lnet/lib-ptl.c
+++ b/
lnet/lnet/lib-ptl.c
@@
-765,9
+765,9
@@
lnet_ptl_cleanup(struct lnet_portal *ptl)
mhash = mtable->mt_mhash;
/* cleanup ME */
for (j = 0; j < LNET_MT_HASH_SIZE + 1; j++) {
mhash = mtable->mt_mhash;
/* cleanup ME */
for (j = 0; j < LNET_MT_HASH_SIZE + 1; j++) {
- while (
!list_empty(&mhash[j])) {
-
me = list_entry(mhash[j].next
,
- struct lnet_me, me_list);
+ while (
(me = list_first_entry_or_null(&mhash[j],
+
struct lnet_me
,
+ me_list)) != NULL) {
CERROR("Active ME %p on exit\n", me);
list_del(&me->me_list);
CDEBUG(D_MALLOC,
CERROR("Active ME %p on exit\n", me);
list_del(&me->me_list);
CDEBUG(D_MALLOC,