Commit c5841642 authored by Vasily Tarasov's avatar Vasily Tarasov Committed by Jens Axboe

[PATCH] block layer: elv_iosched_show should get elv_list_lock

elv_iosched_show function iterates other elv_list, hence
elv_list_lock should be got.
Signed-off-by: default avatarVasily Tarasov <vtaras@openvz.org>
Signed-off-by: default avatarVasily Tarasov <jens.axboe@oracle.com>
parent e6e80f29
...@@ -1085,7 +1085,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) ...@@ -1085,7 +1085,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
struct list_head *entry; struct list_head *entry;
int len = 0; int len = 0;
spin_lock_irq(q->queue_lock); spin_lock_irq(&elv_list_lock);
list_for_each(entry, &elv_list) { list_for_each(entry, &elv_list) {
struct elevator_type *__e; struct elevator_type *__e;
...@@ -1095,7 +1095,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) ...@@ -1095,7 +1095,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
else else
len += sprintf(name+len, "%s ", __e->elevator_name); len += sprintf(name+len, "%s ", __e->elevator_name);
} }
spin_unlock_irq(q->queue_lock); spin_unlock_irq(&elv_list_lock);
len += sprintf(len+name, "\n"); len += sprintf(len+name, "\n");
return len; return len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment