Message ID | 1404991067-12847-1-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index d4c34c8471a4..4bde74798d2b 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -1547,6 +1547,10 @@ static int lookup_dir_item_inode(struct btrfs_root *root, goto out; } 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_type = btrfs_dir_type(path->nodes[0], di);