Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
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	[thread overview]
Message-ID: <1506632100-6293-1-git-send-email-jbacik@fb.com> (raw)

This should be verify'ing that we have an empty key, not that we have a
filled out key.

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
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)) {
-- 
2.7.4


             reply	other threads:[~2017-09-28 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 20:55 Josef Bacik [this message]
2017-09-29 16:59 ` [PATCH] btrfs-progs: fix invalid assert in backref.c David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506632100-6293-1-git-send-email-jbacik@fb.com \
    --to=josef@toxicpanda.com \
    --cc=dsterba@suse.cz \
    --cc=jeffm@suse.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox