diff options
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/elevator.c b/block/elevator.c index d4d39dab841a..451654fadab0 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -876,7 +876,7 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e) | |||
876 | { | 876 | { |
877 | struct elevator_queue *old = q->elevator; | 877 | struct elevator_queue *old = q->elevator; |
878 | bool registered = old->registered; | 878 | bool registered = old->registered; |
879 | int i, err; | 879 | int err; |
880 | 880 | ||
881 | /* | 881 | /* |
882 | * Turn on BYPASS and drain all requests w/ elevator private data. | 882 | * Turn on BYPASS and drain all requests w/ elevator private data. |
@@ -895,8 +895,7 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e) | |||
895 | ioc_clear_queue(q); | 895 | ioc_clear_queue(q); |
896 | spin_unlock_irq(q->queue_lock); | 896 | spin_unlock_irq(q->queue_lock); |
897 | 897 | ||
898 | for (i = 0; i < BLKIO_NR_POLICIES; i++) | 898 | blkg_destroy_all(q, false); |
899 | blkg_destroy_all(q, i, false); | ||
900 | 899 | ||
901 | /* allocate, init and register new elevator */ | 900 | /* allocate, init and register new elevator */ |
902 | err = -ENOMEM; | 901 | err = -ENOMEM; |