From patchwork Sat Oct 29 08:08:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403145 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 14B306070F for ; Sat, 29 Oct 2016 08:13:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 029632A5D7 for ; Sat, 29 Oct 2016 08:13:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB6BF2A5EC; Sat, 29 Oct 2016 08:13:57 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 A9CE92A5ED for ; Sat, 29 Oct 2016 08:13:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934269AbcJ2IND (ORCPT ); Sat, 29 Oct 2016 04:13:03 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36174 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933554AbcJ2IMz (ORCPT ); Sat, 29 Oct 2016 04:12:55 -0400 Received: by mail-pf0-f195.google.com with SMTP id n85so3384231pfi.3; Sat, 29 Oct 2016 01:12:54 -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=9H188MMUUHjs33hP0E67JMQWjDC3+xsMexgVpLyiUHE=; b=u1FowFdIlBZvU4U2ftZF8ZxIR2IB8iqdw4o9rynLD1yCp/a+3i7hvWxwWOxfZDc3oP O4O5bBB0zFym7SrlrgMVA5MDiksO+2g3NXT6PQAc6h2QiKDQTuf0FmPD4m/hMiLxLStW 6kq0gcFEwJoy1Od5Xfsjh/yhrDbNaVE3jHIUsww2qGlxjnOz9SHU/9CNNsMUnt8U3K2a WYRxKvWAO/zlygu+ETvW+AAFXKt3UFXj6Fpj0tZGksbHrICcVUJtG7IUj/WoqhKovum3 Yu4sW04vKkNtowa1oJ7cfJ004TaLKkXM75mewOJ8jzj+ZuAmVnCg7dlN3FQXA7q8GKD1 36tQ== 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=9H188MMUUHjs33hP0E67JMQWjDC3+xsMexgVpLyiUHE=; b=Kwj85ifgJ07YJCxt0XHQQ8AEvGDD4eKt9ypmVDH3+sqMz/HRzpytZgsXC35pNEN9QI KvBOBjQoDi8tw/HIzRCK81keZkcpacBSG7rLe7QQStLoP6iRrWbsn/1/XBhIYUTJ9usP 3ayP8Hj6Rg50vkp8vxq2N8dWq2yOVDKbjrMFOJAT6Fw505AM9KbRnY4l5HKcVxNpE/S5 aly049CMBbCCoMXyQlKPvyCy5L4oBRzrAuWGtU9XZgzSgEeBrmsGWcqkvVCi+Y0BUDVJ V4VRxXTVZeEJrkQo9yFc46M306OF7kHbKkeAWcsLUCo4OfHYW5DJoIOoKg5d82H2aEUr 4G7A== X-Gm-Message-State: ABUngvcWpRH0pHpMGo919G0Pgjz4a4XZxbxk4bhCYA/QDuy28uWGk6WvmOdsljBdBIDMLw== X-Received: by 10.98.35.140 with SMTP id q12mr31557211pfj.180.1477728773886; Sat, 29 Oct 2016 01:12:53 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id f75sm23483734pfj.76.2016.10.29.01.12.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:12:53 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Joern Engel , Prasad Joshi , logfs@logfs.org (open list:LogFS) Subject: [PATCH 13/60] fs: logfs: remove unnecesary check Date: Sat, 29 Oct 2016 16:08:12 +0800 Message-Id: <1477728600-12938-14-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-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 The check on bio->bi_vcnt doesn't make sense in erase_end_io(). Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig --- 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 ff5e3e31bca3..f05a02ff43e6 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);