diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-16 15:57:04 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-11-16 08:34:14 -0700 |
commit | 657985f857c0027db6f17fa4af7e8818038e0b15 (patch) | |
tree | 832a26e04dbe10d029867d2669520014fc50792c /drivers/block/pktcdvd.c | |
parent | f64d9b2eacb95d4fbd17c8680cab803a5965744c (diff) | |
download | linux-657985f857c0027db6f17fa4af7e8818038e0b15.tar.bz2 |
pktcdvd: use set_capacity_and_notify
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index ef1c1f094ea4..b8bb8ec7538d 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -2130,8 +2130,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write) } set_capacity(pd->disk, lba << 2); - set_capacity(pd->bdev->bd_disk, lba << 2); - bd_set_nr_sectors(pd->bdev, lba << 2); + set_capacity_and_notify(pd->bdev->bd_disk, lba << 2); q = bdev_get_queue(pd->bdev); if (write) { |