Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297878
b: refs/heads/master
c: 4ed1d16
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh authored and David Sterba committed Mar 22, 2012
1 parent 8f2779c commit e1a5ec4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 0678b61851b510ba68341dff59cd9b47e1712e91
refs/heads/master: 4ed1d16e944c61cfb8a78159548672e7df168d97
10 changes: 6 additions & 4 deletions trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3417,16 +3417,18 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans,
key.offset = chunk_offset;

ret = btrfs_insert_item(trans, chunk_root, &key, chunk, item_size);
BUG_ON(ret);

if (map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
if (ret == 0 && map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
/*
* TODO: Cleanup of inserted chunk root in case of
* failure.
*/
ret = btrfs_add_system_chunk(chunk_root, &key, chunk,
item_size);
BUG_ON(ret);
}

kfree(chunk);
return 0;
return ret;
}

/*
Expand Down

0 comments on commit e1a5ec4

Please sign in to comment.