summaryrefslogtreecommitdiff
path: root/block/ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-05-25 08:12:59 +0200
committerJens Axboe <axboe@kernel.dk>2021-06-01 07:45:27 -0600
commitab4b57057d744861f670b47b163209727b26418b (patch)
tree2d978987284bb49a1b3b466fabdb62f680694210 /block/ioctl.c
parentc8276b954d2dacbabe587c0421a9344529af5bad (diff)
block: move bd_part_count to struct gendisk
The bd_part_count value only makes sense for whole devices, so move it to struct gendisk and give it a more descriptive name. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20210525061301.2242282-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/ioctl.c')
-rw-r--r--block/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 8ba1ed8defd0..24beec9ca9c9 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -89,7 +89,7 @@ static int blkdev_reread_part(struct block_device *bdev, fmode_t mode)
return -EINVAL;
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
- if (bdev->bd_part_count)
+ if (bdev->bd_disk->open_partitions)
return -EBUSY;
/*