Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297875
b: refs/heads/master
c: ce59897
h: refs/heads/master
i:
  297873: b5f947f
  297871: 41e91d3
v: v3
  • Loading branch information
Mark Fasheh authored and David Sterba committed Mar 22, 2012
1 parent 983fa57 commit 2b52378
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 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: 2c536799f1bde905bbacf7af3aa6be3f4de66005
refs/heads/master: ce598979be6f83549c90f42ba522a19a33727611
3 changes: 1 addition & 2 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -6734,10 +6734,9 @@ int btrfs_create_subvol_root(struct btrfs_trans_handle *trans,
btrfs_i_size_write(inode, 0);

err = btrfs_update_inode(trans, new_root, inode);
BUG_ON(err);

iput(inode);
return 0;
return err;
}

struct inode *btrfs_alloc_inode(struct super_block *sb)
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,11 @@ static noinline int create_subvol(struct btrfs_root *root,
btrfs_record_root_in_trans(trans, new_root);

ret = btrfs_create_subvol_root(trans, new_root, new_dirid);
if (ret) {
/* We potentially lose an unused inode item here */
goto fail;
}

/*
* insert the directory item
*/
Expand Down

0 comments on commit 2b52378

Please sign in to comment.