mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
block: remove the discard_alignment 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:
committed by
Jens Axboe
parent
7b8917f5e2
commit
7cf34d97ab
@@ -1498,8 +1498,8 @@ static inline int bdev_discard_alignment(struct block_device *bdev)
|
||||
struct request_queue *q = bdev_get_queue(bdev);
|
||||
|
||||
if (bdev != bdev->bd_contains)
|
||||
return bdev->bd_part->discard_alignment;
|
||||
|
||||
return queue_limit_discard_alignment(&q->limits,
|
||||
bdev->bd_part->start_sect);
|
||||
return q->limits.discard_alignment;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user