From patchwork Tue Feb 14 15:29:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9572129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08C1660578 for ; Tue, 14 Feb 2017 15:30:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F17D927D16 for ; Tue, 14 Feb 2017 15:30:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E62A128408; Tue, 14 Feb 2017 15:30:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8434827D16 for ; Tue, 14 Feb 2017 15:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754487AbdBNPaL (ORCPT ); Tue, 14 Feb 2017 10:30:11 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:33103 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932100AbdBNP3d (ORCPT ); Tue, 14 Feb 2017 10:29:33 -0500 Received: by mail-ot0-f195.google.com with SMTP id t47so2205894ota.0; Tue, 14 Feb 2017 07:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ij8w3Kddz3dGumFCNrARsUBIU5chq30aBVexKEbq9Rc=; b=X9pbrHWZ6QP/H+Y27jUCM2WSKy4JOMHCRNUWP2g68Ns6iiNTsXyUm3Hi811UmSuZvM 045IxPS8OGNicapC97x0patDhA8dC/voC2LPNkAtuXO/9R2Kfp9ksSn3m7h/QHUit9/Z LZ9UdsV4CSUBBDlCdn7puuzyDnI/a1Hw+UDb+l/rs2vWVnDHahHxBxEa5iji3xunIubl q4YC8nb8v++nu4udVhY9md46qnEFmyNbaWT/7dIEb+O5u2UxqgoWrPkEmsb1XsEGu0pv cdOenVJwXDzWlpZ63dm3u5Jjg+55j5svR9Y1miMF8VDdEbDrCcHrYQotMh7Yb5BmjAwz zyfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ij8w3Kddz3dGumFCNrARsUBIU5chq30aBVexKEbq9Rc=; b=UZXgYuhnC+L4mBNOPYuUWol7l9CAWCWlEpZ8UPlza1qAVgS3626JWk5TPTTHollAIP CcQr7MGPjlrz4xCFF246GFYdaiVmNRPNCNy7aMjvAizxjfU7sKA4avw00t8A+xxJcIPU jvMmq5wQ/nV3i9lwM2tOXSEmprozxc8h9/rg4L6eJfUVMjIbHYOVtjgdCWEMajte9T2j 8Z1GzJLXQsGfGWKc2TVpLNAUaJuVdj4KaLFrvpcBGWuXfEUtsW8A2LCr7sWHISzFb/fR tifam6czcTBiLsTxrsrWNiJh2cyEbjb84/B4KoqvYU/A8WagL5qgSDVAGD4aETrzESws LVJQ== X-Gm-Message-State: AMke39nt0/AfBbSHDoO7jSGDW8jOxnjH35OlaL9O20VVSRiwp73ytY/ia1+Tt/Ion3RM6w== X-Received: by 10.98.211.220 with SMTP id z89mr31921560pfk.3.1487086167757; Tue, 14 Feb 2017 07:29:27 -0800 (PST) Received: from localhost (li405-222.members.linode.com. [106.187.53.222]) by smtp.gmail.com with ESMTPSA id s65sm2000109pgb.64.2017.02.14.07.29.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 07:29:27 -0800 (PST) From: Ming Lei To: Shaohua Li , Jens Axboe , linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, linux-block@vger.kernel.org, Christoph Hellwig , NeilBrown Cc: Ming Lei Subject: [PATCH v2 4/5] md: remove unnecessary check on mddev Date: Tue, 14 Feb 2017 23:29:02 +0800 Message-Id: <1487086143-10255-5-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487086143-10255-1-git-send-email-tom.leiming@gmail.com> References: <1487086143-10255-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP mddev is never NULL and neither is ->bio_set, so remove the check. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- drivers/md/md.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index b5e2adf3493b..6cd96fde2a67 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -193,9 +193,6 @@ EXPORT_SYMBOL_GPL(bio_alloc_mddev); struct bio *bio_clone_mddev(struct bio *bio, gfp_t gfp_mask, struct mddev *mddev) { - if (!mddev || !mddev->bio_set) - return bio_clone(bio, gfp_mask); - return bio_clone_bioset(bio, gfp_mask, mddev->bio_set); } EXPORT_SYMBOL_GPL(bio_clone_mddev);