Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: don't warn in btrfs_add_orphan Btrfs: fix free space cache when there are pinned extents and clusters V2 Btrfs: Fix uninitialized root flags for subvolumes btrfs: clear __GFP_FS flag in the space cache inode Btrfs: fix memory leak in start_transaction() Btrfs: fix memory leak in btrfs_ioctl_start_sync() Btrfs: fix subvol_sem leak in btrfs_rename() Btrfs: Fix oops for defrag with compression turned on Btrfs: fix /proc/mounts info. Btrfs: fix compiler warning in file.c
This commit is contained in:
@@ -373,6 +373,10 @@ static noinline int create_subvol(struct btrfs_root *root,
|
||||
inode_item->nbytes = cpu_to_le64(root->leafsize);
|
||||
inode_item->mode = cpu_to_le32(S_IFDIR | 0755);
|
||||
|
||||
root_item.flags = 0;
|
||||
root_item.byte_limit = 0;
|
||||
inode_item->flags = cpu_to_le64(BTRFS_INODE_ROOT_ITEM_INIT);
|
||||
|
||||
btrfs_set_root_bytenr(&root_item, leaf->start);
|
||||
btrfs_set_root_generation(&root_item, trans->transid);
|
||||
btrfs_set_root_level(&root_item, 0);
|
||||
@@ -2436,8 +2440,10 @@ static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp
|
||||
return PTR_ERR(trans);
|
||||
transid = trans->transid;
|
||||
ret = btrfs_commit_transaction_async(trans, root, 0);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
btrfs_end_transaction(trans, root);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (argp)
|
||||
if (copy_to_user(argp, &transid, sizeof(transid)))
|
||||
|
Reference in New Issue
Block a user