diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-04-07 14:15:50 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-04-07 14:15:50 -0400 |
commit | 454abcc57f1d48a976291bc4af73b5f087e21d70 (patch) | |
tree | 5bba999ea3f31527da02b60604531cc5fb52ea57 /fs/btrfs/ioctl.c | |
parent | 88aab9341a315d81118be6b41c45e4fe32b94bc1 (diff) | |
parent | 6221f222c0ebf1acdf7abcf927178f40e1a65e2a (diff) |
Merge commit 'v2.6.39-rc2' into spi/merge
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 7c07fe26b7cf..cfc264fefdb0 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -373,6 +373,10 @@ static noinline int create_subvol(struct btrfs_root *root, | |||
373 | inode_item->nbytes = cpu_to_le64(root->leafsize); | 373 | inode_item->nbytes = cpu_to_le64(root->leafsize); |
374 | inode_item->mode = cpu_to_le32(S_IFDIR | 0755); | 374 | inode_item->mode = cpu_to_le32(S_IFDIR | 0755); |
375 | 375 | ||
376 | root_item.flags = 0; | ||
377 | root_item.byte_limit = 0; | ||
378 | inode_item->flags = cpu_to_le64(BTRFS_INODE_ROOT_ITEM_INIT); | ||
379 | |||
376 | btrfs_set_root_bytenr(&root_item, leaf->start); | 380 | btrfs_set_root_bytenr(&root_item, leaf->start); |
377 | btrfs_set_root_generation(&root_item, trans->transid); | 381 | btrfs_set_root_generation(&root_item, trans->transid); |
378 | btrfs_set_root_level(&root_item, 0); | 382 | btrfs_set_root_level(&root_item, 0); |
@@ -2436,8 +2440,10 @@ static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp | |||
2436 | return PTR_ERR(trans); | 2440 | return PTR_ERR(trans); |
2437 | transid = trans->transid; | 2441 | transid = trans->transid; |
2438 | ret = btrfs_commit_transaction_async(trans, root, 0); | 2442 | ret = btrfs_commit_transaction_async(trans, root, 0); |
2439 | if (ret) | 2443 | if (ret) { |
2444 | btrfs_end_transaction(trans, root); | ||
2440 | return ret; | 2445 | return ret; |
2446 | } | ||
2441 | 2447 | ||
2442 | if (argp) | 2448 | if (argp) |
2443 | if (copy_to_user(argp, &transid, sizeof(transid))) | 2449 | if (copy_to_user(argp, &transid, sizeof(transid))) |