Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756061AbcL0QDB (ORCPT ); Tue, 27 Dec 2016 11:03:01 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 629 Lines: 24 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)) { -- 2.7.4