Message ID | 20220127063546.1314111-13-hch@lst.de (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Mike Snitzer |
Headers | show |
Series | [01/14] drbd: set ->bi_bdev in drbd_req_new | expand |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5978cb87e9372..984ccafb11ea8 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -558,17 +558,13 @@ static struct bio *alloc_tio(struct clone_info *ci, struct dm_target *ti, return NULL; } } else { - struct bio *clone = bio_alloc_bioset(NULL, 0, 0, gfp_mask, - &ci->io->md->bs); + struct bio *clone = bio_clone_fast(ci->bio, gfp_mask, + &ci->io->md->bs); if (!clone) return NULL; tio = clone_to_tio(clone); tio->inside_dm_io = false; - if (__bio_clone_fast(&tio->clone, ci->bio, gfp_mask) < 0) { - bio_put(clone); - return NULL; - } } tio->magic = DM_TIO_MAGIC;
Replace an open coded bio_clone_fast with the actual helper. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/md/dm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)