diff options
author | Kees Cook <kees.cook@canonical.com> | 2011-05-05 20:02:12 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-05-05 20:02:12 -0400 |
commit | 490b94be0282c3b67f56453628ff0aaae827a670 (patch) | |
tree | 8f77bbe2aac76f1cdd85f5fe0e6aad65db515f3b /block | |
parent | addd0a09fc06179f2e02b4221775d9ab265c9fc7 (diff) |
iosched: remove redundant sprintf
After the anticipatory scheduler was dropped, there was no need to
special-case the request_module string. As such, drop the redundant
sprintf and stack variable.
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/elevator.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/block/elevator.c b/block/elevator.c index 6f6abc08bb56..3cd0d8c84902 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -155,13 +155,8 @@ static struct elevator_type *elevator_get(const char *name) | |||
155 | 155 | ||
156 | e = elevator_find(name); | 156 | e = elevator_find(name); |
157 | if (!e) { | 157 | if (!e) { |
158 | char elv[ELV_NAME_MAX + strlen("-iosched")]; | ||
159 | |||
160 | spin_unlock(&elv_list_lock); | 158 | spin_unlock(&elv_list_lock); |
161 | 159 | request_module("%s-iosched", name); | |
162 | snprintf(elv, sizeof(elv), "%s-iosched", name); | ||
163 | |||
164 | request_module("%s", elv); | ||
165 | spin_lock(&elv_list_lock); | 160 | spin_lock(&elv_list_lock); |
166 | e = elevator_find(name); | 161 | e = elevator_find(name); |
167 | } | 162 | } |