projects
/
platform
/
upstream
/
btrfs-progs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
btrfs-progs: Introduce btrfs_raid_array and related infrastructures
[platform/upstream/btrfs-progs.git]
/
root-tree.c
diff --git
a/root-tree.c
b/root-tree.c
index
ab01a14
..
6b8f8c1
100644
(file)
--- a/
root-tree.c
+++ b/
root-tree.c
@@
-51,7
+51,8
@@
int btrfs_find_last_root(struct btrfs_root *root, u64 objectid,
l = path->nodes[0];
slot = path->slots[0] - 1;
btrfs_item_key_to_cpu(l, &found_key, slot);
- if (found_key.objectid != objectid) {
+ if (found_key.type != BTRFS_ROOT_ITEM_KEY ||
+ found_key.objectid != objectid) {
ret = -ENOENT;
goto out;
}