summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorVasily Tarasov <vtaras@openvz.org>2006-10-11 13:23:48 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:28 -0700
commit116191c17c2c8e7e7d4fa9d5ed4a3218ff8d2055 (patch)
treed06b34263398a5390396e4ad0827da83017b1438 /block
parenta4fce7747b167aa5e9aa43c4f816744d8a97e021 (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> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.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 9b72dc7c8a5c..8ed284691c0b 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -892,7 +892,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;
@@ -902,7 +902,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;