diff options
author | Yu Kuai <yukuai3@huawei.com> | 2022-10-22 04:16:15 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-22 23:14:38 +0200 |
commit | 02341a08c9dec5a88527981b0bdf0fb6f7499cbf (patch) | |
tree | 8f07b907b29715c6f55769aa852192ba73152f74 /drivers/nvme/host/tcp.c | |
parent | blktrace: remove unnessary stop block trace in 'blk_trace_shutdown' (diff) | |
download | linux-02341a08c9dec5a88527981b0bdf0fb6f7499cbf.tar.xz linux-02341a08c9dec5a88527981b0bdf0fb6f7499cbf.zip |
block: fix memory leak for elevator on add_disk failure
The default elevator is allocated in the beginning of device_add_disk(),
however, it's not freed in the following error path.
Fixes: 50e34d78815e ("block: disable the elevator int del_gendisk")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20221022021615.2756171-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
0 files changed, 0 insertions, 0 deletions