Skip to contentSkip to conversation

btrfs-progs: fix invalid assert in backref.c

PATCH In review Josef Bacik 2 participants 2 messages Sep 28, 2017 – Sep 29, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: fix invalid assert in backref.c

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

---
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(-)
backref.c +1 -1
index 8fc0fae779f2..8615f6b8677a 100644
@@ -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)) {
Signature · 1 line
2.7.4
#1 lore raw
Quoted 7 lines · Josef Bacik

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

---
Dave this is on top of your ext/jeffm/extent-cache branch and fixes the segfault you reported.

Great, thanks for the fix. I'll fold it to the original patch so the branches remain bisectable.