From patchwork Tue Dec 27 15:56:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489425 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 2FADA62AAD for ; Tue, 27 Dec 2016 16:02:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21F6F201BC for ; Tue, 27 Dec 2016 16:02:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16698223B2; Tue, 27 Dec 2016 16:02:34 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham 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 A4061201BC for ; Tue, 27 Dec 2016 16:02:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755745AbcL0QCc (ORCPT ); Tue, 27 Dec 2016 11:02:32 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34937 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbcL0QB3 (ORCPT ); Tue, 27 Dec 2016 11:01:29 -0500 Received: by mail-pg0-f68.google.com with SMTP id i5so12790517pgh.2; Tue, 27 Dec 2016 08:01:24 -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=S9QE+aUJp/vadR20IvB33cz5vEr6/THIE0N6loU53hg=; b=IsP4ZnayoUGTjhLpls7xtyi0WCaf/+wEshjxXiKGNnizRDtxok/UK79mxFHNO53AkB O/uYtAuA0qTeJq4jAfRODomjp/pJsj/wGk0tNhxnWp+EUVztC7V2mi2Bu1zuBhfxbbry QkEu+7UOLzXQWaMOQ71p3298fwg0TveCnk042Z3FRIKpIaqAvsR5iOr9GAhuh7qKoomC KDa4AMf3DzKo6SFiR2geYrQiNXpsret9HIYe0xb6sMvcnFx2saW4hA2wcpptevwFQt5/ gIBsRj69Ay5/xKf/oMBHsUJEa1uRFm9pQOzobtC/KmuR7KZydjU5Gme55BMk4vyMQ/p/ k2lw== 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=S9QE+aUJp/vadR20IvB33cz5vEr6/THIE0N6loU53hg=; b=c9vrEUnZk3xzinb3fjXnjX7Sf3BX+f9DMThIVe3EcZGhXqH77Ko5yPfGF4hg3uJ402 WKBT4UdVy6a7uZlW/Q4iHtltAUXVyyhuwxm2sPoNfZ9VPwUrbD+0PgiXtSI2huJSY0tA ajnm8DtmB3kuDoplA5PkSwrN3vky14Fp4SS4p/aFZwV9xmWE34m2iF13UtnLYFTa/GTZ lJb0MDCoK45bCTeLl5z8/GdKbdXzEFN6Yspp6NhycSj6Hup7DhV/JGStixd13h0renpy 1sE+ZBeYzPaz34Yj+JA6zWlJPzX61EqOp1gdKGwn6OG/AoZN2A6I2TbZ+/pCqZJnMfP4 4eqQ== X-Gm-Message-State: AIkVDXJ4KoatmaDJzITNxFAH6NHVsfjmJLOjq6nn0ASPElQD4VIJAGARb5pe4HHf2H2mLw== X-Received: by 10.84.208.102 with SMTP id f35mr68102473plh.137.1482854483416; Tue, 27 Dec 2016 08:01:23 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id g85sm50234409pfe.38.2016.12.27.08.01.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:01:22 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Jens Axboe Subject: [PATCH v1 26/54] block: blk-merge: remove unnecessary check Date: Tue, 27 Dec 2016 23:56:15 +0800 Message-Id: <1482854250-13481-27-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854250-13481-1-git-send-email-tom.leiming@gmail.com> References: <1482854250-13481-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 In this case, 'sectors' can't be zero at all, so remove the check. Signed-off-by: Ming Lei --- block/blk-merge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index a801f62a104b..05b6a3ef63f6 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -136,9 +136,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q, nsegs++; sectors = max_sectors; } - if (sectors) - goto split; - /* Make this single bvec as the 1st segment */ + goto split; } if (bvprvp && blk_queue_cluster(q)) {