diff options
author | Christoph Hellwig <hch@lst.de> | 2022-02-02 19:01:06 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-02-04 17:43:18 +0300 |
commit | 56b4b5abcdab6daf71c5536fca2772f178590e06 (patch) | |
tree | f27fc9b4b4be99d2b82d0b545b323016b32f0691 /drivers/md/bcache | |
parent | 3c4b455ef8acdacd0e5ecd33428d4f32f861637a (diff) | |
download | linux-56b4b5abcdab6daf71c5536fca2772f178590e06.tar.xz |
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>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r-- | drivers/md/bcache/request.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 7ba59d08ed87..574b02b94f1a 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -686,7 +686,7 @@ static void do_bio_hook(struct search *s, struct bio *bio = &s->bio.bio; bio_init(bio, NULL, NULL, 0, 0); - __bio_clone_fast(bio, orig_bio); + __bio_clone_fast(bio, orig_bio, GFP_NOIO); /* * bi_end_io can be set separately somewhere else, e.g. the * variants in, |