block: nbd: convert to blkdev_reread_part()
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>
This commit is contained in:
parent
06f0e9e68c
commit
9dcd137953
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue