Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6309422imm; Wed, 27 Jun 2018 05:50:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIa897zC1qD0Bk7RnLQfgC7oB3khckWSRYYhBrpCxqpo9rgTeE+nDYn8y+MM1uTeGzh5nZk X-Received: by 2002:a17:902:6bca:: with SMTP id m10-v6mr6051020plt.6.1530103809926; Wed, 27 Jun 2018 05:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530103809; cv=none; d=google.com; s=arc-20160816; b=LgBlzstYj/QRd3VJKDypT0nTf1kSKKiF55Tl4Hr45lAGkNYL+GUh7oVCe/NlU+x31+ s9hNQJW3iQN7mMoufuOF+CAJ1ge5qcg1LOEjdmzc1mn9efXGybWf8Vl7udptq9qHPYJE uz3Q1jmxHmfjTBVD9F33mv7q5lLRXknk7nm8p601L0xHMPuuiJ/0rCOyaoezt40rJYWs V8b4TvBXw/nN2AUspJmrur1VDG0foQ0ymSSON30dCdpaKG0fBGha5hsxQzi8hLHTqwJN WjpTA0x8BsorI2ev/dM+0tSzltk5zW6e304CTlvtlA7PdDhHaTmDAtvXOA8eWI51Pkz4 kBKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=X+hx6fj+Z+55qJs6hIp0wcJpXzqzJB5qm8vGewlIOOg=; b=06KLk7QSMOaBTGoeY0Rqk4d5sn+t3ZfKM8wgRxCka1mL3nU05GaVzqe8Sp1oika960 WAVDuJfOKa05C711UqO4ttgF6iFrVviVEJRe+56cD+eHbcDkaU4YEtR9ncNdOVFhqrYb h40P9RSPvgCTPuZ919/1HaQYFfwapAcugRRbAz8or4odvqgn8Wqj69mRU5gtud8DOB67 UE3ZPUDThKtBJIE7v08eORXZ6rxQ6bDcfDD2VtSbm/JJGYFs5G3P7u2hiDnxTx+6PyZP u/ClGlOznCv7E72za47wdjF1kp96CfIxfGBsCZvqqWorUzuQ3WbhGrLoEbPScQ7143br mc2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 128-v6si3424544pge.444.2018.06.27.05.49.55; Wed, 27 Jun 2018 05:50:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965082AbeF0Mqi (ORCPT + 99 others); Wed, 27 Jun 2018 08:46:38 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39218 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964963AbeF0Mqg (ORCPT ); Wed, 27 Jun 2018 08:46:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0133401EF04; Wed, 27 Jun 2018 12:46:35 +0000 (UTC) Received: from localhost (ovpn-12-44.pek2.redhat.com [10.72.12.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8B2D2156888; Wed, 27 Jun 2018 12:46:27 +0000 (UTC) From: Ming Lei To: Jens Axboe , Christoph Hellwig , Kent Overstreet Cc: David Sterba , Huang Ying , Mike Snitzer , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana , Randy Dunlap , Christoph Hellwig Subject: [PATCH V7 03/24] exofs: use bio_clone_fast in _write_mirror Date: Wed, 27 Jun 2018 20:45:27 +0800 Message-Id: <20180627124548.3456-4-ming.lei@redhat.com> In-Reply-To: <20180627124548.3456-1-ming.lei@redhat.com> References: <20180627124548.3456-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 27 Jun 2018 12:46:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 27 Jun 2018 12:46:35 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig The mirroring code never changes the bio data or biovecs. This means we can reuse the biovec allocation easily instead of duplicating it. Acked-by: Boaz Harrosh Reviewed-by: Ming Lei Signed-off-by: Christoph Hellwig --- fs/exofs/ore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c index 1b8b44637e70..5331a15a61f1 100644 --- a/fs/exofs/ore.c +++ b/fs/exofs/ore.c @@ -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", -- 2.9.5