diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 83a7ba4a3eeca86d297d5c694e249005e9bd1199..0e385d8e9b86ec1f2d6be66b26107acf90a939d2 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -711,7 +711,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, bdev->bd_inode->i_size = 0; set_capacity(nbd->disk, 0); if (max_part > 0) - ioctl_by_bdev(bdev, BLKRRPART, 0); + blkdev_reread_part(bdev); if (nbd->disconnect) /* user requested, ignore socket errors */ return 0; return nbd->harderror;