diff options
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/block/elevator.c b/block/elevator.c index 25f6ef28e3b..ce866eb75f6 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -134,13 +134,13 @@ static struct elevator_type *elevator_get(const char *name) { struct elevator_type *e; - spin_lock_irq(&elv_list_lock); + spin_lock(&elv_list_lock); e = elevator_find(name); if (e && !try_module_get(e->elevator_owner)) e = NULL; - spin_unlock_irq(&elv_list_lock); + spin_unlock(&elv_list_lock); return e; } @@ -964,17 +964,19 @@ void elv_unregister_queue(struct request_queue *q) int elv_register(struct elevator_type *e) { - spin_lock_irq(&elv_list_lock); + char *def = ""; + + spin_lock(&elv_list_lock); BUG_ON(elevator_find(e->elevator_name)); list_add_tail(&e->list, &elv_list); - spin_unlock_irq(&elv_list_lock); + spin_unlock(&elv_list_lock); - printk(KERN_INFO "io scheduler %s registered", e->elevator_name); if (!strcmp(e->elevator_name, chosen_elevator) || (!*chosen_elevator && !strcmp(e->elevator_name, CONFIG_DEFAULT_IOSCHED))) - printk(" (default)"); - printk("\n"); + def = " (default)"; + + printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def); return 0; } EXPORT_SYMBOL_GPL(elv_register); @@ -997,9 +999,9 @@ void elv_unregister(struct elevator_type *e) read_unlock(&tasklist_lock); } - spin_lock_irq(&elv_list_lock); + spin_lock(&elv_list_lock); list_del_init(&e->list); - spin_unlock_irq(&elv_list_lock); + spin_unlock(&elv_list_lock); } EXPORT_SYMBOL_GPL(elv_unregister); @@ -1117,7 +1119,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) struct list_head *entry; int len = 0; - spin_lock_irq(&elv_list_lock); + spin_lock(&elv_list_lock); list_for_each(entry, &elv_list) { struct elevator_type *__e; @@ -1127,7 +1129,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) else len += sprintf(name+len, "%s ", __e->elevator_name); } - spin_unlock_irq(&elv_list_lock); + spin_unlock(&elv_list_lock); len += sprintf(len+name, "\n"); return len; |