aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-06-12 08:20:58 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-06-23 11:10:38 -0400
commitacf421755593f7d7bd9352d57eda796c6eb4fa43 (patch)
tree08fe234e5a28556ef32d29de1d3045cfe94a931c /block
parentfda151d9feafc0e8418f23c716587c44394fcdbf (diff)
[PATCH] remove dead code from elevator switching
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>
Diffstat (limited to 'block')
-rw-r--r--block/elevator.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/block/elevator.c b/block/elevator.c
index a0afdd317cef..d00b283f31d2 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -850,12 +850,9 @@ fail_register:
850 * one again (along with re-adding the sysfs dir) 850 * one again (along with re-adding the sysfs dir)
851 */ 851 */
852 elevator_exit(e); 852 elevator_exit(e);
853 e = NULL;
854 q->elevator = old_elevator; 853 q->elevator = old_elevator;
855 elv_register_queue(q); 854 elv_register_queue(q);
856 clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags); 855 clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
857 if (e)
858 kobject_put(&e->kobj);
859 return 0; 856 return 0;
860} 857}
861 858