summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-05-02 09:15:22 -0400
committerChris Mason <chris.mason@fusionio.com>2013-06-19 13:52:22 -0400
commit10f1af0fe7de5a0310657993c7c21a1d78087e56 (patch)
tree4990d5f1ae30e02fa184fb9269bbca81b28f5f1a /cmds-restore.c
parent11be10f71e1af5256f221feb9e91300b3e28bbef (diff)
Btrfs-progs: pass properly formated key to read_fs_root
We have a BUG_ON() in read_fs_root that expects key->offset == (u64)-1. Restore will just pass in the location it reads out of the inode if it has a subvol reference and pass that in, which doesn't have offset == (u64)-1, so it causes restore blow up. This was reported in bugzilla and this patch fixed the problem. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index dcf459ff..eca528dd 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -708,6 +708,7 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
goto next;
}
+ location.offset = (u64)-1;
search_root = btrfs_read_fs_root(root->fs_info,
&location);
if (IS_ERR(search_root)) {