Skip to content

Commit b39e465

Browse files
Jon Maloydavem330
authored andcommitted
tipc: some cleanups in the file discover.c
To facilitate the coming changes in the neighbor discovery functionality we make some renaming and refactoring of that code. The functional changes in this commit are trivial, e.g., that we move the message sending call in tipc_disc_timeout() outside the spinlock protected region. Acked-by: Ying Xue <[email protected]> Signed-off-by: Jon Maloy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cb30a63 commit b39e465

File tree

4 files changed

+155
-166
lines changed

4 files changed

+155
-166
lines changed

net/tipc/bearer.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void tipc_bearer_add_dest(struct net *net, u32 bearer_id, u32 dest)
210210
rcu_read_lock();
211211
b = rcu_dereference_rtnl(tn->bearer_list[bearer_id]);
212212
if (b)
213-
tipc_disc_add_dest(b->link_req);
213+
tipc_disc_add_dest(b->disc);
214214
rcu_read_unlock();
215215
}
216216

@@ -222,7 +222,7 @@ void tipc_bearer_remove_dest(struct net *net, u32 bearer_id, u32 dest)
222222
rcu_read_lock();
223223
b = rcu_dereference_rtnl(tn->bearer_list[bearer_id]);
224224
if (b)
225-
tipc_disc_remove_dest(b->link_req);
225+
tipc_disc_remove_dest(b->disc);
226226
rcu_read_unlock();
227227
}
228228

@@ -389,8 +389,8 @@ static void bearer_disable(struct net *net, struct tipc_bearer *b)
389389
tipc_node_delete_links(net, bearer_id);
390390
b->media->disable_media(b);
391391
RCU_INIT_POINTER(b->media_ptr, NULL);
392-
if (b->link_req)
393-
tipc_disc_delete(b->link_req);
392+
if (b->disc)
393+
tipc_disc_delete(b->disc);
394394
RCU_INIT_POINTER(tn->bearer_list[bearer_id], NULL);
395395
kfree_rcu(b, rcu);
396396
tipc_mon_delete(net, bearer_id);

net/tipc/bearer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ struct tipc_bearer {
159159
u32 tolerance;
160160
u32 domain;
161161
u32 identity;
162-
struct tipc_link_req *link_req;
162+
struct tipc_discoverer *disc;
163163
char net_plane;
164164
unsigned long up;
165165
};

0 commit comments

Comments
 (0)