summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorVasily Tarasov <vtaras@openvz.org>2006-11-29 14:04:14 +0100
committerAdrian Bunk <bunk@stusta.de>2006-11-29 14:04:14 +0100
commitb46d1f7bcd9db417ce46463de3bbbb095fe8013a (patch)
treeec658e936f006fc5b5ba39a36834246b54e44016 /block
parent18ff15828e2912b6d68a0481e01cd1ec34eb19e6 (diff)
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. Also the question is: in elv_iosched_show, elv_iosched_store q->elevator->elevator_type construction is used without locking q->queue_lock. Is it expected?.. Signed-off-by: Vasily Tarasov <vtaras@openvz.org> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'block')
-rw-r--r--block/elevator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c
index ef1e606ab166..11e356e440f0 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -814,7 +814,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
struct list_head *entry;
int len = 0;
- spin_lock_irq(q->queue_lock);
+ spin_lock_irq(&elv_list_lock);
list_for_each(entry, &elv_list) {
struct elevator_type *__e;
@@ -824,7 +824,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
else
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");
return len;