Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85886
b: refs/heads/master
c: e164094
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Feb 19, 2008
1 parent 1427bde commit efadcbc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ffc4e7595734cf768fa60cea8a4d545dfef8231a
refs/heads/master: e164094964e6e20fe7fce418e06a9dce952bb7a4
15 changes: 15 additions & 0 deletions trunk/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,21 @@ static struct elevator_type *elevator_get(const char *name)
spin_lock(&elv_list_lock);

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

spin_unlock(&elv_list_lock);

if (!strcmp(name, "anticipatory"))
sprintf(elv, "as-iosched");
else
sprintf(elv, "%s-iosched", name);

request_module(elv);
spin_lock(&elv_list_lock);
e = elevator_find(name);
}

if (e && !try_module_get(e->elevator_owner))
e = NULL;

Expand Down

0 comments on commit efadcbc

Please sign in to comment.