mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 11:41:29 -04:00
null_blk: clean up null_del_dev() to use cached dev pointer
Replace remaining nullb->dev dereferences with the already-cached local dev variable. No functional change. Signed-off-by: Zizhi Wo <wozizhi@huawei.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20260725022509.714271-7-wozizhi@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -1779,7 +1779,7 @@ static void null_del_dev(struct nullb *nullb)
|
||||
|
||||
del_gendisk(nullb->disk);
|
||||
|
||||
if (test_bit(NULLB_DEV_FL_THROTTLED, &nullb->dev->flags)) {
|
||||
if (test_bit(NULLB_DEV_FL_THROTTLED, &dev->flags)) {
|
||||
hrtimer_cancel(&nullb->bw_timer);
|
||||
atomic_long_set(&nullb->cur_bytes, LONG_MAX);
|
||||
blk_mq_start_stopped_hw_queues(nullb->q, true);
|
||||
@@ -1791,7 +1791,7 @@ static void null_del_dev(struct nullb *nullb)
|
||||
blk_mq_free_tag_set(nullb->tag_set);
|
||||
kfree(nullb->queues);
|
||||
if (null_cache_active(nullb))
|
||||
null_free_device_storage(nullb->dev, true);
|
||||
null_free_device_storage(dev, true);
|
||||
kfree(nullb);
|
||||
dev->nullb = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user