]> git.baikalelectronics.ru Git - kernel.git/commit
block: use bdev_alignment_offset in part_alignment_offset_show
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Apr 2022 04:52:47 +0000 (06:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Apr 2022 01:49:59 +0000 (19:49 -0600)
commit1f9a13663224c0b90de8605d8e976f57648e2610
tree0895fe0cbbcc8241b1eac7b943e6759e9e3df5bd
parent1f0fc5312bd225e29c1deb8512d8cc7c1da59570
block: use bdev_alignment_offset in part_alignment_offset_show

Replace the open coded offset calculation with the proper helper.
This is an ABI change in that the -1 for a misaligned partition is
properly propagated, which can be considered a bug fix and matches
what is done on the whole device.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220415045258.199825-17-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c