btrfsprogs/0163-btrfs-progs-fsck-fix-segfault.patch

27 lines
897 B
Diff
Raw Normal View History

From f0294c7f1135acd58320c8282ed68a337138a7c7 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
Date: Mon, 30 Apr 2012 17:46:53 +0200
Subject: [PATCH 163/170] btrfs-progs: fsck: fix segfault
fix from Chris Mason via pastebin
Signed-off-by: David Sterba <dsterba@suse.cz>
---
cmds-check.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/cmds-check.c
===================================================================
--- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/cmds-check.c
+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/cmds-check.c
@@ -2209,7 +2209,8 @@ static int check_owner_ref(struct btrfs_
if (btrfs_header_owner(buf) == back->root)
return 0;
}
- BUG_ON(rec->is_root);
+ if (rec->is_root)
+ return 1;
/* try to find the block by search corresponding fs tree */
key.objectid = btrfs_header_owner(buf);