Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tipc: remove dead code in tipc_net and relatives

dist_queue is no longer used since commit 37922ea4a310
("tipc: permit overlapping service ranges in name table")

Acked-by: Jon Maloy <jmaloy@redhat.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Hoang Huu Le <hoang.h.le@dektech.com.au>
Link: https://lore.kernel.org/r/20201028032712.31009-1-hoang.h.le@dektech.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hoang Huu Le and committed by
Jakub Kicinski
09b5678c 8da1f442

-24
-2
net/tipc/core.c
··· 81 81 if (err) 82 82 goto out_nametbl; 83 83 84 - INIT_LIST_HEAD(&tn->dist_queue); 85 - 86 84 err = tipc_bcast_init(net); 87 85 if (err) 88 86 goto out_bclink;
-3
net/tipc/core.h
··· 132 132 spinlock_t nametbl_lock; 133 133 struct name_table *nametbl; 134 134 135 - /* Name dist queue */ 136 - struct list_head dist_queue; 137 - 138 135 /* Topology subscription server */ 139 136 struct tipc_topsrv *topsrv; 140 137 atomic_t subscription_count;
-19
net/tipc/name_distr.c
··· 244 244 kfree_rcu(p, rcu); 245 245 } 246 246 247 - /** 248 - * tipc_dist_queue_purge - remove deferred updates from a node that went down 249 - */ 250 - static void tipc_dist_queue_purge(struct net *net, u32 addr) 251 - { 252 - struct tipc_net *tn = net_generic(net, tipc_net_id); 253 - struct distr_queue_item *e, *tmp; 254 - 255 - spin_lock_bh(&tn->nametbl_lock); 256 - list_for_each_entry_safe(e, tmp, &tn->dist_queue, next) { 257 - if (e->node != addr) 258 - continue; 259 - list_del(&e->next); 260 - kfree(e); 261 - } 262 - spin_unlock_bh(&tn->nametbl_lock); 263 - } 264 - 265 247 void tipc_publ_notify(struct net *net, struct list_head *nsub_list, 266 248 u32 addr, u16 capabilities) 267 249 { ··· 254 272 255 273 list_for_each_entry_safe(publ, tmp, nsub_list, binding_node) 256 274 tipc_publ_purge(net, publ, addr); 257 - tipc_dist_queue_purge(net, addr); 258 275 spin_lock_bh(&tn->nametbl_lock); 259 276 if (!(capabilities & TIPC_NAMED_BCAST)) 260 277 nt->rc_dests--;