diff --git a/0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch b/0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch deleted file mode 100644 index 30319ae..0000000 --- a/0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cc4992b4c3610de4b30ea6a168573841e6cd43e5 Mon Sep 17 00:00:00 2001 -From: Josef Bacik -Date: Wed, 7 Dec 2011 16:11:23 -0500 -Subject: [PATCH 167/170] Btrfs-progs: make find_and_setup_root return an error - -Don't BUG(), return an error so the recovery program can work its mojo. - -Signed-off-by: Josef Bacik ---- - disk-io.c | 2 ++ - 1 file changed, 2 insertions(+) - -Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/disk-io.c -=================================================================== ---- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/disk-io.c -+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/disk-io.c -@@ -524,6 +524,8 @@ static int find_and_setup_root(struct bt - generation = btrfs_root_generation(&root->root_item); - root->node = read_tree_block(root, btrfs_root_bytenr(&root->root_item), - blocksize, generation); -+ if (!root->node) -+ return -ENOENT; - if (!extent_buffer_uptodate(root->node)) - return -EIO; - diff --git a/0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch b/0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch deleted file mode 100644 index 9707ea0..0000000 --- a/0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6c90b5f56a389b37fcdd85e6dd904288d601b27a Mon Sep 17 00:00:00 2001 -From: Josef Bacik -Date: Wed, 7 Dec 2011 15:54:13 -0500 -Subject: [PATCH 168/170] Btrfs-progs: don't bug out if we can't find the last - root - -Return an error instead of BUG()'ing out. - -Signed-off-by: Josef Bacik ---- - root-tree.c | 5 +++++ - 1 file changed, 5 insertions(+) - -Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/root-tree.c -=================================================================== ---- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/root-tree.c -+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/root-tree.c -@@ -45,6 +45,11 @@ int btrfs_find_last_root(struct btrfs_ro - - BUG_ON(ret == 0); - l = path->nodes[0]; -+ if (path->slots[0] == 0) { -+ ret = -ENOENT; -+ goto out; -+ } -+ - slot = path->slots[0] - 1; - btrfs_item_key_to_cpu(l, &found_key, slot); - if (found_key.objectid != objectid) { diff --git a/btrfsprogs.changes b/btrfsprogs.changes index 95f3a8e..a92124a 100644 --- a/btrfsprogs.changes +++ b/btrfsprogs.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 29 00:00:01 CEST 2017 - dsterba@suse.cz + +- Removed patches: + - 0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch + - 0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch + ------------------------------------------------------------------- Tue Aug 29 00:00:00 CEST 2017 - dsterba@suse.cz diff --git a/btrfsprogs.spec b/btrfsprogs.spec index 2855aa7..4cdce21 100644 --- a/btrfsprogs.spec +++ b/btrfsprogs.spec @@ -43,8 +43,6 @@ Source4: setup-btrfs.sh Source5: sles11-defaults.h Patch163: 0163-btrfs-progs-fsck-fix-segfault.patch -#Patch167: 0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch -#Patch168: 0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch Patch169: btrfs-support-pie.patch Patch1000: local-version-override.patch @@ -141,8 +139,6 @@ thing. %prep %setup -q -n btrfs-progs-v%{version} %patch163 -p1 -#%patch167 -p1 -#%patch168 -p1 %patch169 -p1 %patch1000 -p1 %patch1001 -p1