summaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-10-29 15:19:37 +0100
committerJens Axboe <axboe@kernel.dk>2024-10-29 16:15:00 +0100
commit2f5a65ef30a636d5030917eebd283ac447a212af (patch)
treeb28320d8f261c41868ccaf7bcca173b3d2e7e50d /block/blk-merge.c
parentiov_iter: don't require contiguous pages in iov_iter_extract_bvec_pages (diff)
downloadlinux-2f5a65ef30a636d5030917eebd283ac447a212af.tar.xz
linux-2f5a65ef30a636d5030917eebd283ac447a212af.zip
block: add a bdev_limits helper
Add a helper to get the queue_limits from the bdev without having to poke into the request_queue. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20241029141937.249920-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 8b9a9646aed8..d813d799cee7 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -411,10 +411,9 @@ struct bio *bio_split_zone_append(struct bio *bio,
*/
struct bio *bio_split_to_limits(struct bio *bio)
{
- const struct queue_limits *lim = &bdev_get_queue(bio->bi_bdev)->limits;
unsigned int nr_segs;
- return __bio_split_to_limits(bio, lim, &nr_segs);
+ return __bio_split_to_limits(bio, bdev_limits(bio->bi_bdev), &nr_segs);
}
EXPORT_SYMBOL(bio_split_to_limits);