diff options
Diffstat (limited to 'fs/ocfs2/cluster')
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index d58c7dddb853..f0bdfd944c44 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -261,14 +261,12 @@ out: | |||
261 | 261 | ||
262 | static void o2net_complete_nodes_nsw(struct o2net_node *nn) | 262 | static void o2net_complete_nodes_nsw(struct o2net_node *nn) |
263 | { | 263 | { |
264 | struct list_head *iter, *tmp; | 264 | struct o2net_status_wait *nsw, *tmp; |
265 | unsigned int num_kills = 0; | 265 | unsigned int num_kills = 0; |
266 | struct o2net_status_wait *nsw; | ||
267 | 266 | ||
268 | assert_spin_locked(&nn->nn_lock); | 267 | assert_spin_locked(&nn->nn_lock); |
269 | 268 | ||
270 | list_for_each_safe(iter, tmp, &nn->nn_status_list) { | 269 | list_for_each_entry_safe(nsw, tmp, &nn->nn_status_list, ns_node_item) { |
271 | nsw = list_entry(iter, struct o2net_status_wait, ns_node_item); | ||
272 | o2net_complete_nsw_locked(nn, nsw, O2NET_ERR_DIED, 0); | 270 | o2net_complete_nsw_locked(nn, nsw, O2NET_ERR_DIED, 0); |
273 | num_kills++; | 271 | num_kills++; |
274 | } | 272 | } |
@@ -764,13 +762,10 @@ EXPORT_SYMBOL_GPL(o2net_register_handler); | |||
764 | 762 | ||
765 | void o2net_unregister_handler_list(struct list_head *list) | 763 | void o2net_unregister_handler_list(struct list_head *list) |
766 | { | 764 | { |
767 | struct list_head *pos, *n; | 765 | struct o2net_msg_handler *nmh, *n; |
768 | struct o2net_msg_handler *nmh; | ||
769 | 766 | ||
770 | write_lock(&o2net_handler_lock); | 767 | write_lock(&o2net_handler_lock); |
771 | list_for_each_safe(pos, n, list) { | 768 | list_for_each_entry_safe(nmh, n, list, nh_unregister_item) { |
772 | nmh = list_entry(pos, struct o2net_msg_handler, | ||
773 | nh_unregister_item); | ||
774 | mlog(ML_TCP, "unregistering handler func %p type %u key %08x\n", | 769 | mlog(ML_TCP, "unregistering handler func %p type %u key %08x\n", |
775 | nmh->nh_func, nmh->nh_msg_type, nmh->nh_key); | 770 | nmh->nh_func, nmh->nh_msg_type, nmh->nh_key); |
776 | rb_erase(&nmh->nh_node, &o2net_handler_tree); | 771 | rb_erase(&nmh->nh_node, &o2net_handler_tree); |