|
@@ -1628,6 +1628,10 @@ static int lookup_dir_item_inode(struct btrfs_root *root,
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
|
|
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
|
|
|
|
+ if (key.type == BTRFS_ROOT_ITEM_KEY) {
|
|
|
|
+ ret = -ENOENT;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
*found_inode = key.objectid;
|
|
*found_inode = key.objectid;
|
|
*found_type = btrfs_dir_type(path->nodes[0], di);
|
|
*found_type = btrfs_dir_type(path->nodes[0], di);
|
|
|
|
|