mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 00:25:24 -04:00
nvme: remove redundant bdev local variable
Use disk directly instead of getting it from bdev->bd_disk. Signed-off-by: Israel Rukshin <israelr@nvidia.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
committed by
Keith Busch
parent
1a7812b25e
commit
88c918d1ee
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user