Commit acf421755593f7d7bd9352d57eda796c6eb4fa43

Authored by Dave Jones
Committed by Jens Axboe
1 parent fda151d9fe

[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>

Showing 1 changed file with 0 additions and 3 deletions Side-by-side Diff

... ... @@ -850,12 +850,9 @@
850 850 * one again (along with re-adding the sysfs dir)
851 851 */
852 852 elevator_exit(e);
853   - e = NULL;
854 853 q->elevator = old_elevator;
855 854 elv_register_queue(q);
856 855 clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
857   - if (e)
858   - kobject_put(&e->kobj);
859 856 return 0;
860 857 }
861 858