block: nbd: convert to blkdev_reread_part()
authorMing Lei <ming.lei@canonical.com>
Wed, 6 May 2015 04:26:25 +0000 (12:26 +0800)
committerJens Axboe <axboe@fb.com>
Wed, 20 May 2015 15:06:13 +0000 (09:06 -0600)
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nbd.c

index 83a7ba4a3eeca86d297d5c694e249005e9bd1199..0e385d8e9b86ec1f2d6be66b26107acf90a939d2 100644 (file)
@@ -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;