diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-15 06:52:51 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-18 03:49:59 +0200 |
commit | f0f975a4dde890bfe25ce17bf07a6495453988a4 (patch) | |
tree | 0edec9693385e212c0773127b7caba964ee1e312 /block/partitions/core.c | |
parent | block: remove queue_discard_alignment (diff) | |
download | linux-f0f975a4dde890bfe25ce17bf07a6495453988a4.tar.xz linux-f0f975a4dde890bfe25ce17bf07a6495453988a4.zip |
block: use bdev_discard_alignment in part_discard_alignment_show
Use the bdev based alignment helper instead of open coding it.
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-21-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/partitions/core.c')
-rw-r--r-- | block/partitions/core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c index 240b3fff521e..70dec1c78521 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -206,11 +206,7 @@ static ssize_t part_alignment_offset_show(struct device *dev, static ssize_t part_discard_alignment_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct block_device *bdev = dev_to_bdev(dev); - - return sprintf(buf, "%u\n", - queue_limit_discard_alignment(&bdev_get_queue(bdev)->limits, - bdev->bd_start_sect)); + return sprintf(buf, "%u\n", bdev_discard_alignment(dev_to_bdev(dev))); } static DEVICE_ATTR(partition, 0444, part_partition_show, NULL); |