aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2021-05-25 08:12:59 +0200
committerJens Axboe <[email protected]>2021-06-01 07:45:27 -0600
commitab4b57057d744861f670b47b163209727b26418b (patch)
tree2d978987284bb49a1b3b466fabdb62f680694210 /include/linux
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 <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk_types.h3
-rw-r--r--include/linux/genhd.h1
2 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index a09660671fa4..fd3860d18d7e 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -39,9 +39,6 @@ struct block_device {
#endif
struct kobject *bd_holder_dir;
u8 bd_partno;
- /* number of times partitions within this device have been opened. */
- unsigned bd_part_count;
-
spinlock_t bd_size_lock; /* for bd_inode->i_size updates */
struct gendisk * bd_disk;
struct backing_dev_info *bd_bdi;
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 1fabb1559110..47d4605c0e7e 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -156,6 +156,7 @@ struct gendisk {
#define GD_QUEUE_REF 2
struct mutex open_mutex; /* open/close mutex */
+ unsigned open_partitions; /* number of open partitions */
struct kobject *slave_dir;