diff options
author | Israel Rukshin <[email protected]> | 2024-07-11 14:40:53 +0300 |
---|---|---|
committer | Keith Busch <[email protected]> | 2024-07-15 13:44:59 -0700 |
commit | 88c918d1ee2c88cc5be3aa67ce048414fee471ff (patch) | |
tree | 34ed408effb3da80f60302abd609bd4860aaa009 | |
parent | 1a7812b25e69f6c63c52d3bc93c0970ab7ad9660 (diff) |
nvme: remove redundant bdev local variable
Use disk directly instead of getting it from bdev->bd_disk.
Signed-off-by: Israel Rukshin <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
-rw-r--r-- | drivers/nvme/host/sysfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c index 3c55f7edd181..ba05faaac562 100644 --- a/drivers/nvme/host/sysfs.c +++ b/drivers/nvme/host/sysfs.c @@ -233,13 +233,12 @@ static ssize_t nuse_show(struct device *dev, struct device_attribute *attr, { struct nvme_ns_head *head = dev_to_ns_head(dev); struct gendisk *disk = dev_to_disk(dev); - struct block_device *bdev = disk->part0; int ret; - if (nvme_disk_is_ns_head(bdev->bd_disk)) + if (nvme_disk_is_ns_head(disk)) ret = ns_head_update_nuse(head); else - ret = ns_update_nuse(bdev->bd_disk->private_data); + ret = ns_update_nuse(disk->private_data); if (ret) return ret; |