Prepare for checking if partition is changed. Cc: Ewan Milne <emilne@xxxxxxxxxx> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> --- block/partitions/core.c | 1 + include/linux/blk_types.h | 1 + 2 files changed, 2 insertions(+) diff --git a/block/partitions/core.c b/block/partitions/core.c index 430ff7863556..07981f663f66 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -352,6 +352,7 @@ static struct block_device *add_partition(struct gendisk *disk, int partno, bdev->bd_start_sect = start; bdev_set_nr_sectors(bdev, len); + bdev->bd_part_flags = flags; if (info) { err = -ENOMEM; diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index db026b6ec15a..4d43b80cb9e9 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -40,6 +40,7 @@ struct block_device { #endif struct kobject *bd_holder_dir; u8 bd_partno; + u8 bd_part_flags; /* number of times partitions within this device have been opened. */ unsigned bd_part_count; -- 2.29.2