From e9c9e2103a78e795e3343fb27b51ff6517055433 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Tue, 5 Nov 2019 13:49:16 +1100 Subject: [PATCH] LU-12936 lnet: remove pt_number from lnet_peer_table. This fields is no longer used - except for an ASSERT(). It did have a use once, but that was removed in Commit ffd8e881bb98 ("LU-2456 lnet: Dynamic LNet Configuration (DLC)") Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: I43d4c50d68fea3194f8515ac02599ef07b37ad60 Reviewed-on: https://review.whamcloud.com/36671 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Chris Horn Reviewed-by: James Simmons Reviewed-by: Amir Shehata Reviewed-by: Oleg Drokin --- lnet/include/lnet/lib-types.h | 2 -- lnet/lnet/peer.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index b446414..cf2edfd 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -783,7 +783,6 @@ struct lnet_peer_net { * * protected by lnet_net_lock/EX for update * pt_version - * pt_number * pt_hash[...] * pt_peer_list * pt_peers @@ -795,7 +794,6 @@ struct lnet_peer_net { */ struct lnet_peer_table { int pt_version; /* /proc validity stamp */ - int pt_number; /* # peers_ni extant */ struct list_head *pt_hash; /* NID->peer hash */ struct list_head pt_peer_list; /* peers */ int pt_peers; /* # peers */ diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index 1425bd8..2cb9ba3 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -400,8 +400,6 @@ lnet_peer_ni_del_locked(struct lnet_peer_ni *lpni, bool force) /* decrement the ref count on the peer table */ ptable = the_lnet.ln_peer_tables[lpni->lpni_cpt]; - LASSERT(ptable->pt_number > 0); - ptable->pt_number--; /* * The peer_ni can no longer be found with a lookup. But there @@ -1257,7 +1255,6 @@ lnet_peer_attach_peer_ni(struct lnet_peer *lp, ptable = the_lnet.ln_peer_tables[lpni->lpni_cpt]; list_add_tail(&lpni->lpni_hashlist, &ptable->pt_hash[hash]); ptable->pt_version++; - ptable->pt_number++; /* This is the 1st refcount on lpni. */ atomic_inc(&lpni->lpni_refcount); } -- 1.8.3.1