summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-08-31 20:02:33 +0200
committerJens Axboe <axboe@kernel.dk>2020-09-01 16:49:26 -0600
commit7b8917f5e29c377be1db5680249fe30e038cb3eb (patch)
tree08fe31667ad1977295a57dd95c29154ddc069f69 /include/linux/blkdev.h
parente44a6a2359808e0b97ff894569748ad2593b06f9 (diff)
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/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h5
1 files changed, 2 insertions, 3 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;
}