From patchwork Thu Apr 14 12:02:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8834971 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 57630C0553 for ; Thu, 14 Apr 2016 12:04:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E9A620131 for ; Thu, 14 Apr 2016 12:04:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4422820109 for ; Thu, 14 Apr 2016 12:04:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755086AbcDNMDt (ORCPT ); Thu, 14 Apr 2016 08:03:49 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35812 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755076AbcDNMDr (ORCPT ); Thu, 14 Apr 2016 08:03:47 -0400 Received: by mail-oi0-f67.google.com with SMTP id w18so9555964oie.2; Thu, 14 Apr 2016 05:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Y8BzEaLx4CfAFYDoN+58gG2iyxFpRTquTaCQeHIx+2g=; b=WN3JkAucbQHCjvNd2XHlDqbcCJ+xnw6NAZ8aaSIBltV94OuiPbkLaHiEeiuVzUcTp+ eIrS69BRWRC8atSnd1ZufozdC8Q9XubuVaMGqH1FZZUNX1sK8yjopy9Nq/lV6wPmiw2K pRCGREZkj5kfbUAtsgRkgGxh2l70j8zZNik9BfBkagGKLEEcJIFDz7xT/C8MykDyAufr Sf9DbVo8M8mc6gKvaFl2Kpw1F4lxk8N7zKAMhZ5Uq059+8RPLK3TvhrmhnXXJUKF+NQF 6eKP8ch/maLA+Gy3RwWpXYgfcauGrnQVS8IIxYPLlqgEfKGM83peZ7dLdUePePZCptsn 0jEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Y8BzEaLx4CfAFYDoN+58gG2iyxFpRTquTaCQeHIx+2g=; b=REKEO6Hjv1XoEuwcdIet/cCC8KTK9D0phLmo53xEYelcy1U5gyZ90PxdO61j2Yin1q Hhl92ajYTJ361zHrEwkaZ7ArV7gRv7VsBCOD/dbrWB3RRKRrtsOe8YGEv35fy9wd1XZb hYq5UVe085qlL3WKBlLHczNrxgObVYZ63URW4mlWBBuywNExnC2Q6YTRRLszUuxGSJut sUPsASg+ttHDDsMcxsXswrpedW75sHZEkc7MCB4j1MRIe2Y4UE7wB8iQfg1OBAUcZ5kG eZy4o/eCo8FL7V2P/b3GNEKEhhbybaQWLt8h7A+uWlgtMtPA8NpgXg5pb3G2ZNmgxrmo snZA== X-Gm-Message-State: AOPr4FW01NY/3VashiJ686HXcXr+38Jy7ybPTkxeiO8m6aM1UH5dZe7V5Gt89Yy0A9fHbQ== X-Received: by 10.157.2.71 with SMTP id 65mr7869052otb.129.1460635426888; Thu, 14 Apr 2016 05:03:46 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id wz10sm12564067obc.23.2016.04.14.05.03.46 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:46 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Joern Engel , Prasad Joshi , logfs@logfs.org (open list:LogFS) Subject: [PATCH v1 25/27] fs: logfs: remove unnecesary check Date: Thu, 14 Apr 2016 20:02:43 +0800 Message-Id: <1460635375-28282-26-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-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-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The check on bio->bi_vcnt doesn't make sense in erase_end_io(). Signed-off-by: Ming Lei --- fs/logfs/dev_bdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index a3a446c..29a3fe3 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c @@ -144,7 +144,6 @@ static void erase_end_io(struct bio *bio) struct logfs_super *super = logfs_super(sb); BUG_ON(bio->bi_error); /* FIXME: Retry io or write elsewhere */ - BUG_ON(bio->bi_vcnt == 0); bio_put(bio); if (atomic_dec_and_test(&super->s_pending_writes)) wake_up(&wq);