OSDN Git Service

exofs: use bio_clone_fast in _write_mirror
authorChristoph Hellwig <hch@lst.de>
Tue, 24 Jul 2018 07:52:31 +0000 (09:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 24 Jul 2018 20:43:20 +0000 (14:43 -0600)
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: Christoph Hellwig <hch@lst.de>
Acked-by Boaz Harrosh <ooo@electrozaur.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/exofs/ore.c

index 1b8b446..5331a15 100644 (file)
@@ -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",