diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-15 07:52:50 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-18 04:49:59 +0300 |
commit | 4e1462ffe8998749884d61f91be251a7a8719677 (patch) | |
tree | d414406b2e59976346b235a6db45fcb14c6be1e4 /include/linux | |
parent | 89098b075cb74a80083bc4ed6b71d0ee18b6898f (diff) | |
download | linux-4e1462ffe8998749884d61f91be251a7a8719677.tar.xz |
block: remove queue_discard_alignment
Just use bdev_alignment_offset in disk_discard_alignment_show instead.
That helpers is the same except for an always false branch that doesn't
matter in this slow path.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220415045258.199825-20-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 0a1795ac2627..5a9b7aeda010 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1253,14 +1253,6 @@ bdev_zone_write_granularity(struct block_device *bdev) int bdev_alignment_offset(struct block_device *bdev); -static inline int queue_discard_alignment(const struct request_queue *q) -{ - if (q->limits.discard_misaligned) - return -1; - - return q->limits.discard_alignment; -} - static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector) { unsigned int alignment, granularity, offset; |