Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361951
b: refs/heads/master
c: 1dd0568
h: refs/heads/master
i:
  361949: 92fb285
  361947: f1ee247
  361943: ec00376
  361935: e35bda5
  361919: f62b9ec
v: v3
  • Loading branch information
Tsutomu Itoh authored and Chris Mason committed Mar 21, 2013
1 parent 0fe38a2 commit 2abce6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9abbf1c3131b679379762700201ae69367f3f62
refs/heads/master: 1dd05682b3ef6e70409e130bfd83e91770801589
12 changes: 9 additions & 3 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
0, objectid, NULL, 0, 0, 0);
if (IS_ERR(leaf)) {
ret = PTR_ERR(leaf);
leaf = NULL;
goto fail;
}

Expand Down Expand Up @@ -1334,11 +1335,16 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,

btrfs_tree_unlock(leaf);

return root;

fail:
if (ret)
return ERR_PTR(ret);
if (leaf) {
btrfs_tree_unlock(leaf);
free_extent_buffer(leaf);
}
kfree(root);

return root;
return ERR_PTR(ret);
}

static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans,
Expand Down

0 comments on commit 2abce6c

Please sign in to comment.