summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk_types.h1
-rw-r--r--include/linux/blkdev.h4
-rw-r--r--include/linux/genhd.h3
3 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 520011b95276..a690008f60cd 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -20,6 +20,7 @@ typedef void (bio_end_io_t) (struct bio *);
struct bio_crypt_ctx;
struct block_device {
+ sector_t bd_start_sect;
struct disk_stats __percpu *bd_stats;
unsigned long bd_stamp;
dev_t bd_dev;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 43a25d855e04..619adea57098 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1488,7 +1488,7 @@ static inline int bdev_alignment_offset(struct block_device *bdev)
return -1;
if (bdev_is_partition(bdev))
return queue_limit_alignment_offset(&q->limits,
- bdev->bd_part->start_sect);
+ bdev->bd_start_sect);
return q->limits.alignment_offset;
}
@@ -1529,7 +1529,7 @@ static inline int bdev_discard_alignment(struct block_device *bdev)
if (bdev_is_partition(bdev))
return queue_limit_discard_alignment(&q->limits,
- bdev->bd_part->start_sect);
+ bdev->bd_start_sect);
return q->limits.discard_alignment;
}
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 804ac45fbfbc..50d27f5d38e2 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -51,7 +51,6 @@ struct partition_meta_info {
};
struct hd_struct {
- sector_t start_sect;
struct percpu_ref ref;
struct block_device *bdev;
@@ -298,7 +297,7 @@ extern void rand_initialize_disk(struct gendisk *disk);
static inline sector_t get_start_sect(struct block_device *bdev)
{
- return bdev->bd_part->start_sect;
+ return bdev->bd_start_sect;
}
static inline sector_t bdev_nr_sectors(struct block_device *bdev)