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>
This commit is contained in:
Christoph Hellwig
2020-08-31 20:02:33 +02:00
committed by Jens Axboe
parent e44a6a2359
commit 7b8917f5e2
3 changed files with 6 additions and 7 deletions

View File

@@ -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;
}