]> git.baikalelectronics.ru Git - kernel.git/commit
block: clone crypto and integrity data in __bio_clone_fast
authorChristoph Hellwig <hch@lst.de>
Wed, 2 Feb 2022 16:01:06 +0000 (17:01 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 4 Feb 2022 14:43:18 +0000 (07:43 -0700)
commit86f472463858af974c7fe095056cb5075b514245
treef27fc9b4b4be99d2b82d0b545b323016b32f0691
parent6a217d333dd1d8f9c56dd0bc3f8c702696110643
block: clone crypto and integrity data in __bio_clone_fast

__bio_clone_fast should also clone integrity and crypto data, as a clone
without those is incomplete.  Right now the only caller that can actually
support crypto and integrity data (dm) does it manually for the one
callchain that supports these, but we better do it properly in the core.

Note that all callers except for the above mentioned one also don't need
to handle failure at all, given that the integrity and crypto clones are
based on mempool allocations that won't fail for sleeping allocations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Link: https://lore.kernel.org/r/20220202160109.108149-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c
block/bio.c
block/blk-crypto.c
drivers/md/bcache/request.c
drivers/md/dm.c
drivers/md/md-multipath.c
include/linux/bio.h