summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-08-31 21:02:33 +0300
committerJens Axboe <axboe@kernel.dk>2020-09-02 01:49:26 +0300
commit7b8917f5e29c377be1db5680249fe30e038cb3eb (patch)
tree08fe31667ad1977295a57dd95c29154ddc069f69 /include
parente44a6a2359808e0b97ff894569748ad2593b06f9 (diff)
downloadlinux-7b8917f5e29c377be1db5680249fe30e038cb3eb.tar.xz
block: remove the alignment_offset field from struct hd_struct
The alignment offset is only used in slow path callers, so just calculate it on the fly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h5
-rw-r--r--include/linux/genhd.h1
2 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 0a1730b30ad2..ba1f5f5e11c6 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1456,10 +1456,9 @@ static inline int bdev_alignment_offset(struct block_device *bdev)
if (q->limits.misaligned)
return -1;
-
if (bdev != bdev->bd_contains)
- return bdev->bd_part->alignment_offset;
-
+ return queue_limit_alignment_offset(&q->limits,
+ bdev->bd_part->start_sect);
return q->limits.alignment_offset;
}
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 39025dc0397c..bfa411c80dbb 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -65,7 +65,6 @@ struct hd_struct {
struct disk_stats __percpu *dkstats;
struct percpu_ref ref;
- sector_t alignment_offset;
unsigned int discard_alignment;
struct device __dev;
struct kobject *holder_dir;