Skip to content

Commit

Permalink
elevator: remove redundant code in elv_unregister_queue()
Browse files Browse the repository at this point in the history
"elevator_queue *e" is already declared and initialized in the beginning
of elv_unregister_queue().

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20221019121518.3865235-2-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
YuKuai-huawei authored and axboe committed Oct 24, 2022
1 parent 074501b commit 6d9f4cf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,6 @@ void elv_unregister_queue(struct request_queue *q)
lockdep_assert_held(&q->sysfs_lock);

if (e && e->registered) {
struct elevator_queue *e = q->elevator;

kobject_uevent(&e->kobj, KOBJ_REMOVE);
kobject_del(&e->kobj);

Expand Down

0 comments on commit 6d9f4cf

Please sign in to comment.