From: Christoph Hellwig Date: Mon, 16 Nov 2020 14:57:04 +0000 (+0100) Subject: pktcdvd: use set_capacity_and_notify X-Git-Tag: v5.11-rc1~110^2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=657985f857c0027db6f17fa4af7e8818038e0b15;p=thirdparty%2Flinux.git 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 Signed-off-by: Jens Axboe --- diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index ef1c1f094ea4f..b8bb8ec7538d9 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) {