[PATCH] remove dead code from elevator switching
authorDave Jones <davej@redhat.com>
Mon, 12 Jun 2006 12:20:58 +0000 (14:20 +0200)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Fri, 23 Jun 2006 15:10:38 +0000 (17:10 +0200)
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>
block/elevator.c

index a0afdd317ceffb3d59f230c775da6c03740a426f..d00b283f31d21fdb5256754b75336e1005fb7eed 100644 (file)
@@ -850,12 +850,9 @@ fail_register:
         * 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;
 }