From patchwork Thu Sep 28 20:55:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9976749 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 04F1F60365 for ; Thu, 28 Sep 2017 20:55:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8C4A29744 for ; Thu, 28 Sep 2017 20:55:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAB0229746; Thu, 28 Sep 2017 20:55:07 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 15C3429744 for ; Thu, 28 Sep 2017 20:55:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751490AbdI1UzD (ORCPT ); Thu, 28 Sep 2017 16:55:03 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:55368 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbdI1UzD (ORCPT ); Thu, 28 Sep 2017 16:55:03 -0400 Received: by mail-qt0-f196.google.com with SMTP id x54so3424816qth.12 for ; Thu, 28 Sep 2017 13:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=kQLNUXpuj5PD7knxJeaT8PC3C8AyYcKA2GfJhdAbzWY=; b=JjTNgZVhqNUAVwOciEwbxA8azctTzfz/Rgi7E9U4C1jvAOzOEcvi9Hobhd88eeY86k IEXv1tCuv7L/O6SzA9VV95i5JXf2fMcSp4NN0gCEAS2Sb4RQ1DzOFj+i/IrkKWfTix8S 3yFZ9yUKVPJdMAo4+d2mEO1dEzb3PtWQJzhHGP4QKs15/AjdvxxLT8olFkA0FTBihQtW NUZdlvrRyuFbRHJNzWBLZQuLVU9HE7WrI2ilG1v+VsqeRP5Im06UUOBAt3L+frKFylfm jDYBwgH0Yhg57OUaVcdoOQazITZaeMwDiYgVyE8cEC0jA9Cre9911ulKbVrJKzk17EvJ IXRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=kQLNUXpuj5PD7knxJeaT8PC3C8AyYcKA2GfJhdAbzWY=; b=XWZVgB+TlaxIjnU+Cj3EkU8C+3ceO3IDjuNQVJSpvbvnpIxJzSHUMy646bBj4ZfxxD uu/0eDTQKwEWJUWKU+B7ZB0brI8cQ35uw/P2X8ndgrGN0TOnpe6AV6XPaMJiv7oxK2qd cuHEWwRmHNJl7Gq02olvj3GifxetGFloxjVFDITGCpJRhdL/3L15w+oHPlB/lffs3lGJ em5nHMETAoQ9Mk9SUrTLk9aGRYWmkGpsyZz9oRnBhdS8aAbDPo4r0OAk9zmC6263imMH DXsY25bOdf7Nx+m62cgM/aFJcMZ7XL7OH2JdNkNAjVt18XlA6875l+ch/ruZFRXqp/eV LM6g== X-Gm-Message-State: AMCzsaVwfGdzDMHCtVKbHCDIA2b3Oi1rPT3COSqiAWABYcuAT/fPaQOv dh7Yef3UGfU/JT+0YOm6MCVwtAM1aYA= X-Google-Smtp-Source: AOwi7QA+7ZYZkMoPR/5qZ71+uasKhtozO34+/rJ6PbSoOfBNCUi6j/xJcOADZSrYsEHcKi+HIByilw== X-Received: by 10.237.53.23 with SMTP id a23mr3212548qte.125.1506632102177; Thu, 28 Sep 2017 13:55:02 -0700 (PDT) Received: from localhost ([2606:a000:4381:1201:225:22ff:feb3:e51a]) by smtp.gmail.com with ESMTPSA id a50sm1655297qtc.87.2017.09.28.13.55.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2017 13:55:01 -0700 (PDT) From: Josef Bacik X-Google-Original-From: Josef Bacik To: linux-btrfs@vger.kernel.org, kernel-team@fb.com, dsterba@suse.cz, jeffm@suse.com Subject: [PATCH] btrfs-progs: fix invalid assert in backref.c Date: Thu, 28 Sep 2017 16:55:00 -0400 Message-Id: <1506632100-6293-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.7.4 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 This should be verify'ing that we have an empty key, not that we have a filled out key. Signed-off-by: Josef Bacik --- Dave this is on top of your ext/jeffm/extent-cache branch and fixes the segfault you reported. backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backref.c b/backref.c index 8fc0fae779f2..8615f6b8677a 100644 --- a/backref.c +++ b/backref.c @@ -465,7 +465,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info, ASSERT(ref->root_id); ASSERT(!ref->parent); - ASSERT(ref->key_for_search.type); + ASSERT(!ref->key_for_search.type); BUG_ON(!ref->wanted_disk_byte); eb = read_tree_block(fs_info, ref->wanted_disk_byte, 0); if (!extent_buffer_uptodate(eb)) {