Skip to content

Commit

Permalink
iosched: remove redundant sprintf
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kees Cook authored and Jens Axboe committed May 6, 2011
1 parent addd0a0 commit 490b94b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,8 @@ static struct elevator_type *elevator_get(const char *name)

e = elevator_find(name);
if (!e) {
char elv[ELV_NAME_MAX + strlen("-iosched")];

spin_unlock(&elv_list_lock);

snprintf(elv, sizeof(elv), "%s-iosched", name);

request_module("%s", elv);
request_module("%s-iosched", name);
spin_lock(&elv_list_lock);
e = elevator_find(name);
}
Expand Down

0 comments on commit 490b94b

Please sign in to comment.