diff options
| author | Ying Xue <[email protected]> | 2014-02-13 22:29:07 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2014-02-13 22:57:05 +0000 |
| commit | 8d8439b686f15c23faef4d7d67c4a9f30ce0f2b5 (patch) | |
| tree | 4b6232ad9258c86bfcb4da63bd715e92980c2ca0 /net/tipc/link.c | |
| parent | tipc: move code for resetting links from bearer.c to link.c (diff) | |
| download | kernel-8d8439b686f15c23faef4d7d67c4a9f30ce0f2b5.tar.gz kernel-8d8439b686f15c23faef4d7d67c4a9f30ce0f2b5.zip | |
tipc: move code for deleting links from bearer.c to link.c
We break out the code for deleting attached links in the
function bearer_disable(), and define a new function named
tipc_link_delete_list() to do this job.
This commit incurs no functional changes, but makes the code of
function bearer_disable() cleaner. It is also a preparation
for a more important change to the bearer code, in a subsequent
commit in this series.
Signed-off-by: Ying Xue <[email protected]>
Reviewed-by: Paul Gortmaker <[email protected]>
Signed-off-by: Jon Maloy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tipc/link.c')
| -rw-r--r-- | net/tipc/link.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 3ff34e8a37d7..424e9f3acd81 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -313,6 +313,15 @@ void tipc_link_delete(struct tipc_link *l_ptr) kfree(l_ptr); } +void tipc_link_delete_list(struct tipc_bearer *b_ptr) +{ + struct tipc_link *l_ptr; + struct tipc_link *temp_l_ptr; + + list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { + tipc_link_delete(l_ptr); + } +} /** * link_schedule_port - schedule port for deferred sending |
