diff options
Diffstat (limited to 'drivers/md/bcache/closure.c')
-rw-r--r-- | drivers/md/bcache/closure.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c index 7d5286b05036..1841d0359bac 100644 --- a/drivers/md/bcache/closure.c +++ b/drivers/md/bcache/closure.c | |||
@@ -64,7 +64,7 @@ EXPORT_SYMBOL(closure_put); | |||
64 | void __closure_wake_up(struct closure_waitlist *wait_list) | 64 | void __closure_wake_up(struct closure_waitlist *wait_list) |
65 | { | 65 | { |
66 | struct llist_node *list; | 66 | struct llist_node *list; |
67 | struct closure *cl; | 67 | struct closure *cl, *t; |
68 | struct llist_node *reverse = NULL; | 68 | struct llist_node *reverse = NULL; |
69 | 69 | ||
70 | list = llist_del_all(&wait_list->list); | 70 | list = llist_del_all(&wait_list->list); |
@@ -73,7 +73,7 @@ void __closure_wake_up(struct closure_waitlist *wait_list) | |||
73 | reverse = llist_reverse_order(list); | 73 | reverse = llist_reverse_order(list); |
74 | 74 | ||
75 | /* Then do the wakeups */ | 75 | /* Then do the wakeups */ |
76 | llist_for_each_entry(cl, reverse, list) { | 76 | llist_for_each_entry_safe(cl, t, reverse, list) { |
77 | closure_set_waiting(cl, 0); | 77 | closure_set_waiting(cl, 0); |
78 | closure_sub(cl, CLOSURE_WAITING + 1); | 78 | closure_sub(cl, CLOSURE_WAITING + 1); |
79 | } | 79 | } |