Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
btrfsprogs.356
2103-Btrfs-progs-don-t-bug-out-if-we-can-t-find...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2103-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch of Package btrfsprogs.356
From 6c90b5f56a389b37fcdd85e6dd904288d601b27a Mon Sep 17 00:00:00 2001 From: Josef Bacik <josef@redhat.com> 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 <josef@redhat.com> --- 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) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor