aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/elevator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c
index 3b652eb..36f1057 100644
--- a/drivers/block/elevator.c
+++ b/drivers/block/elevator.c
@@ -753,8 +753,10 @@ ssize_t elv_iosched_store(request_queue_t *q, const char *name, size_t count)
return -EINVAL;
}
- if (!strcmp(elevator_name, q->elevator->elevator_type->elevator_name))
+ if (!strcmp(elevator_name, q->elevator->elevator_type->elevator_name)) {
+ elevator_put(e);
return count;
+ }
elevator_switch(q, e);
return count;