From patchwork Fri Nov 11 12:05:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9422865 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 8E97B60233 for ; Fri, 11 Nov 2016 12:07:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 814BC297A6 for ; Fri, 11 Nov 2016 12:07:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7622F29851; Fri, 11 Nov 2016 12:07:28 +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 27C2F2984A for ; Fri, 11 Nov 2016 12:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933884AbcKKMHS (ORCPT ); Fri, 11 Nov 2016 07:07:18 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33388 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933861AbcKKMHO (ORCPT ); Fri, 11 Nov 2016 07:07:14 -0500 Received: by mail-pf0-f193.google.com with SMTP id 144so2419404pfv.0; Fri, 11 Nov 2016 04:07:14 -0800 (PST) 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=7HxGzoleV1Ev1C5vzNw1Gq4ef9YP2YVZNmPtOF4Y+dw=; b=C2Wt7wFNR9sUMU6UJBbfJMsaZJRfkG00/iYvANX55E/TJ8m0fK1s1XO5RnZqAuZsbl GaIY/iZjKC+vpdrp1VU/Us3YJQTJeAXrZLry5Lzb/xaFK2ya5ws7uTXqjqBWAeAfnn2a RNnYKSp5GgHws0nUkDlhZvpkJxpgj0j/wGjRgtjWGf1TNC5V5JUytOEMASETx/uaId1O qZwT1tgzeyoW+YrdvsktjLEnPT7uc8aRGdB9R422tj6QuuPg4EtHqO7uhRcUSiRhARpr HQhI7v28TyRT1fyI7UoHUUWWBr5+6/hJu9PQYKjDGQ4q4EMhB8D1xkbY6TTmAc4xfvZz TUBA== 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=7HxGzoleV1Ev1C5vzNw1Gq4ef9YP2YVZNmPtOF4Y+dw=; b=kQP29pNzEM2/Qr302f34rOg1XUTxLb68Ra+eWvbipWmKWMCYl7IpGkVcQl6cSaX8oo oyrXMFutEAOrCd+XOPN5TY5eRH9Z3y7bD6lnS6mkbpSj6TUmMcLFP+8x25G6+wn3uL5F pRg3eleMQVN8ksNOOvwLY8YM71IftX6noyj01cn9ajQO3xKJ/oYGPDjSbBmmYM2r1zc0 YqcpnkgyeIHG/s+Uj2IqNNIltHKp2SInUGqJONfXq7r05YZPXXO4NecTDUqztL3wQiaI Hy/XsfDAPAHjDcNnXwKbxfbEyQNTds8adXu8bGicewZAgFQXWROpxF5kvPSwWkwQPeOb P1IA== X-Gm-Message-State: ABUngve8QDaxLhJtL6yAu6U/xR57paZC2bVYo7bqoineVLD/PunHgpWTIv7H7uAzVLDUyA== X-Received: by 10.99.63.135 with SMTP id m129mr4366378pga.16.1478866033731; Fri, 11 Nov 2016 04:07:13 -0800 (PST) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id hv3sm14786974pad.30.2016.11.11.04.07.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 04:07:13 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Ming Lei , Joern Engel , Prasad Joshi , logfs@logfs.org (open list:LogFS) Subject: [PATCH 12/12] fs: logfs: remove unnecesary check Date: Fri, 11 Nov 2016 20:05:40 +0800 Message-Id: <1478865957-25252-13-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478865957-25252-1-git-send-email-tom.leiming@gmail.com> References: <1478865957-25252-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The check on bio->bi_vcnt doesn't make sense in erase_end_io(). Reviewed-by: Christoph Hellwig 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 b9188be0bf83..9bfa0151d7c9 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c @@ -143,7 +143,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);