]> git.baikalelectronics.ru Git - kernel.git/commit
block: pass a block_device and opf to bio_alloc_bioset
authorChristoph Hellwig <hch@lst.de>
Mon, 24 Jan 2022 09:11:03 +0000 (10:11 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Feb 2022 14:49:59 +0000 (07:49 -0700)
commit9ecaf0ee9a8fb7da3f74d797b0d6dc31cf293c45
treeb09d9594a8b5e3262aca062a5150c50b2e6f5205
parent3588819fc34efe6d460f28cea292f0331857892c
block: pass a block_device and opf to bio_alloc_bioset

Pass the block_device and operation that we plan to use this bio for to
bio_alloc_bioset to optimize the assigment.  NULL/0 can be passed, both
for the passthrough case on a raw request_queue and to temporarily avoid
refactoring some nasty code.

Also move the gfp_mask argument after the nr_vecs argument for a much
more logical calling convention matching what most of the kernel does.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220124091107.642561-16-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
19 files changed:
block/bio.c
block/bounce.c
drivers/block/drbd/drbd_actlog.c
drivers/block/drbd/drbd_bitmap.c
drivers/md/bcache/request.c
drivers/md/dm-crypt.c
drivers/md/dm-io.c
drivers/md/dm-writecache.c
drivers/md/dm.c
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5-cache.c
drivers/md/raid5-ppl.c
drivers/target/target_core_iblock.c
fs/btrfs/extent_io.c
fs/f2fs/data.c
fs/iomap/buffered-io.c
include/linux/bio.h