From patchwork Tue Jun 6 23:45:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9770199 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 BE33F6034B for ; Tue, 6 Jun 2017 23:45:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0216284E4 for ; Tue, 6 Jun 2017 23:45:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94ADC2851F; Tue, 6 Jun 2017 23:45:46 +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_SIGNED, 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 31753284E4 for ; Tue, 6 Jun 2017 23:45:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbdFFXpo (ORCPT ); Tue, 6 Jun 2017 19:45:44 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:35893 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbdFFXpn (ORCPT ); Tue, 6 Jun 2017 19:45:43 -0400 Received: by mail-pg0-f54.google.com with SMTP id a70so32458029pge.3 for ; Tue, 06 Jun 2017 16:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=PEzXtGocj0wdOKCSuBAl6MYI6VRWTbzDutGSMZ2UpwE=; b=z3eFKufCYuyjrmoPVny5cleDHEIlj697rzLZpIzjGScKoMR4EtXEthWrYtWUp7PEDg ndqQ2l0B554tm75ck9D4tSvGi79s5utdG4+rLXua1bEaVyx/sgBK7RVloqei6wJ2hUtN LxK+gRhSZSmKH9AcPF2+gI9sBZF0LXaMJ6DgYo8VCDVabONoSQuPK4p5Sv6TOqMNQvHD VqfeSsMm3ybfQw88Rwy8eBtO1+C1sMp9BdFVFtpGTnRFV//stybJyJmuYc6s7xh/45eQ vMLeQ306Ea5KIIG0ytOIzjjsonmo8OXFkC2r1qntN9mYyceBNIsQ7AkysY24Q/eBI8Nj 6H6w== 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:in-reply-to:references; bh=PEzXtGocj0wdOKCSuBAl6MYI6VRWTbzDutGSMZ2UpwE=; b=N3OqqwIB6+sQzN0RxX8XGOVoGdsnWsstqJ3K/Ym1pdeMSpfhSmcmd4kD3rAy/MLstR Ba3gwd6D8IHHP4eWbL1StvnNyLAWIylGiCr2rzXhplgDnsRVwRuKWQQOJgpIzuO/go5/ tA+cxP3GmyQ4JVtp0RpHDzkBEiIlyLx1aAUkomyhnGTW1iDGHf1/Msi8Eafn4BV98R+A gZ5Te2RYfnPZq0OSZphzHBIl5zYv3SLgjSl9r8rpP8+Br1vPtjNHVu92s+9KlY+EwCRi y+ZywsePLFA7vYnCZVhkkUzXEni0hkf436vnzZ/4asx0wYVacKM5RqkAaNy/fLi0k3Nw vF5A== X-Gm-Message-State: AODbwcBCThehPnDNiAeNrJss7CcRonbIcgm03YnPsnsqVOAYoaxtWcxI Eo7g5IRQ6O7qJY2Ym7K+rw== X-Received: by 10.84.224.1 with SMTP id r1mr24769152plj.262.1496792742412; Tue, 06 Jun 2017 16:45:42 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:200::3:f879]) by smtp.gmail.com with ESMTPSA id u194sm60175680pgc.2.2017.06.06.16.45.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 16:45:41 -0700 (PDT) From: Omar Sandoval To: linux-btrfs@vger.kernel.org Cc: Josef Bacik , Liu Bo , kernel-team@fb.com Subject: [PATCH 2/7] Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT() Date: Tue, 6 Jun 2017 16:45:27 -0700 Message-Id: <5e543709c942292f3e97cbd22fd3137dd521bb16.1496792333.git.osandov@fb.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Omar Sandoval Signed-off-by: Omar Sandoval Reviewed-by: David Sterba --- fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 7c01b4e9e3b6..6032e9a635f2 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -782,7 +782,7 @@ static void add_pinned_bytes(struct btrfs_fs_info *fs_info, s64 num_bytes, } space_info = __find_space_info(fs_info, flags); - BUG_ON(!space_info); /* Logic bug */ + ASSERT(space_info); percpu_counter_add(&space_info->total_bytes_pinned, num_bytes); }