aboutsummaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorVasily Tarasov <vtaras@openvz.org>2006-10-11 07:26:30 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-10-12 09:08:51 -0400
commitc5841642242e9ae817275e09b36b298456dc17d2 (patch)
treebe4c37fe2119ece7cc6d09a625cbf778d08e2ef8 /block/elevator.c
parente6e80f294c2688302f41959c57acfee7e131e489 (diff)
[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: Vasily Tarasov <vtaras@openvz.org> Signed-off-by: Vasily Tarasov <jens.axboe@oracle.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c
index d8030a84773a..8ccd163254b8 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -1085,7 +1085,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
1085 struct list_head *entry; 1085 struct list_head *entry;
1086 int len = 0; 1086 int len = 0;
1087 1087
1088 spin_lock_irq(q->queue_lock); 1088 spin_lock_irq(&elv_list_lock);
1089 list_for_each(entry, &elv_list) { 1089 list_for_each(entry, &elv_list) {
1090 struct elevator_type *__e; 1090 struct elevator_type *__e;
1091 1091
@@ -1095,7 +1095,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
1095 else 1095 else
1096 len += sprintf(name+len, "%s ", __e->elevator_name); 1096 len += sprintf(name+len, "%s ", __e->elevator_name);
1097 } 1097 }
1098 spin_unlock_irq(q->queue_lock); 1098 spin_unlock_irq(&elv_list_lock);
1099 1099
1100 len += sprintf(len+name, "\n"); 1100 len += sprintf(len+name, "\n");
1101 return len; 1101 return len;