Skip to content

Commit

Permalink
[PATCH] remove dead code from elevator switching
Browse files Browse the repository at this point in the history
We already drop the refcount in elevator_exit(), and as
we're setting 'e' to NULL, we'll never take that branch anyway.
Finally, as 'e' is a local var that isn't referenced afterwards,
setting it to NULL is pointless.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
  • Loading branch information
Dave Jones authored and Jens Axboe committed Jun 23, 2006
1 parent fda151d commit acf4217
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,12 +850,9 @@ static int elevator_switch(request_queue_t *q, struct elevator_type *new_e)
* one again (along with re-adding the sysfs dir)
*/
elevator_exit(e);
e = NULL;
q->elevator = old_elevator;
elv_register_queue(q);
clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
if (e)
kobject_put(&e->kobj);
return 0;
}

Expand Down

0 comments on commit acf4217

Please sign in to comment.