~ubuntu-branches/debian/jessie/btrfs-tools/jessie

« back to all changes in this revision

Viewing changes to root-tree.c

  • Committer: Package Import Robot
  • Author(s): Dimitri John Ledkov
  • Date: 2014-04-19 12:12:11 UTC
  • mfrom: (1.2.12) (6.1.37 sid)
  • Revision ID: package-import@ubuntu.com-20140419121211-mski0g757tsdv4x1
Tags: 3.14.1-1
* New upstream release.
* Switch to git-dpm.
* Rebase and cleanup patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0);
41
41
        if (ret < 0)
42
42
                goto out;
43
 
        if (path->slots[0] == 0)
44
 
                return -ENOENT;
 
43
        if (path->slots[0] == 0) {
 
44
                ret = -ENOENT;
 
45
                goto out;
 
46
        }
45
47
 
46
48
        BUG_ON(ret == 0);
47
49
        l = path->nodes[0];
56
58
        memcpy(key, &found_key, sizeof(found_key));
57
59
        ret = 0;
58
60
out:
59
 
        btrfs_release_path(path);
60
61
        btrfs_free_path(path);
61
62
        return ret;
62
63
}
120
121
        write_extent_buffer(l, item, ptr, sizeof(*item));
121
122
        btrfs_mark_buffer_dirty(path->nodes[0]);
122
123
out:
123
 
        btrfs_release_path(path);
124
124
        btrfs_free_path(path);
125
125
        return ret;
126
126
}