Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 076ff2f0 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

exofs: use bio_clone_fast in _write_mirror



The mirroring code never changes the bio data or biovecs.  This means
we can reuse the biovec allocation easily instead of duplicating it.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by Boaz Harrosh <ooo@electrozaur.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c8b27acc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -873,8 +873,8 @@ static int _write_mirror(struct ore_io_state *ios, int cur_comp)
			struct bio *bio;

			if (per_dev != master_dev) {
				bio = bio_clone_kmalloc(master_dev->bio,
							GFP_KERNEL);
				bio = bio_clone_fast(master_dev->bio,
						     GFP_KERNEL, NULL);
				if (unlikely(!bio)) {
					ORE_DBGMSG(
					      "Failed to allocate BIO size=%u\n",