btrfsprogs/0146-Btrfs-progs-don-t-free-the-existing-node.patch
David Sterba 2c5c7c6753 - add btrfsck repair options for:
- rebuild extent records
  - fix block group accounting
  - reset csums for rescue nodatasum mount
  - prune corrupt extent allocation tree blocks
- device scanning fixes for dm and multipath
- initrd support: move btrfs device scan after block device setup
- documentation updates
- add csize for file commpressed size
- updated restore utility

OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=118
2012-03-05 15:09:24 +00:00

32 lines
948 B
Diff

From 77ac61128a0722cab89c785f5f2247304133b214 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Wed, 4 Jan 2012 11:55:43 -0500
Subject: [PATCH 43/43] Btrfs-progs: don't free the existing node
It may be used elsewhere and in the case of a broken fs it won't be there at all
and it makes an assertion trip. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
restore.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/restore.c b/restore.c
index 5aa35ae..a2c2931 100644
--- a/restore.c
+++ b/restore.c
@@ -923,9 +923,7 @@ static struct btrfs_root *open_fs(const char *dev, u64 root_location,
out:
if (fs_location) {
struct btrfs_root *fs_root = root->fs_info->fs_root;
- if (fs_root) {
- free_extent_buffer(fs_root->node);
- } else {
+ if (!fs_root) {
fs_root = malloc(sizeof(struct btrfs_root));
if (!fs_root) {
fprintf(stderr, "Out of memory\n");
--
1.7.6.233.gd79bc