mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
block: add a bio_init_inline helper
Just a simpler wrapper around bio_init for callers that want to initialize a bio with inline bvecs. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
9f7c02e031
commit
70a6f71b1a
@@ -163,14 +163,14 @@ static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data)
|
||||
bio = bio_kmalloc(RESYNC_PAGES, gfp_flags);
|
||||
if (!bio)
|
||||
goto out_free_bio;
|
||||
bio_init(bio, NULL, bio->bi_inline_vecs, RESYNC_PAGES, 0);
|
||||
bio_init_inline(bio, NULL, RESYNC_PAGES, 0);
|
||||
r10_bio->devs[j].bio = bio;
|
||||
if (!conf->have_replacement)
|
||||
continue;
|
||||
bio = bio_kmalloc(RESYNC_PAGES, gfp_flags);
|
||||
if (!bio)
|
||||
goto out_free_bio;
|
||||
bio_init(bio, NULL, bio->bi_inline_vecs, RESYNC_PAGES, 0);
|
||||
bio_init_inline(bio, NULL, RESYNC_PAGES, 0);
|
||||
r10_bio->devs[j].repl_bio = bio;
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user