Merge branch 'for-chris' of
git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work into for-linus Conflicts: fs/btrfs/disk-io.c fs/btrfs/extent-tree.c fs/btrfs/free-space-cache.c fs/btrfs/inode.c fs/btrfs/transaction.c Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@ -243,7 +243,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
|
||||
ip->flags &= ~(BTRFS_INODE_COMPRESS | BTRFS_INODE_NOCOMPRESS);
|
||||
}
|
||||
|
||||
trans = btrfs_join_transaction(root, 1);
|
||||
trans = btrfs_join_transaction(root);
|
||||
BUG_ON(IS_ERR(trans));
|
||||
|
||||
ret = btrfs_update_inode(trans, root, inode);
|
||||
@ -414,8 +414,7 @@ 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,
|
||||
BTRFS_I(dir)->block_group);
|
||||
ret = btrfs_create_subvol_root(trans, new_root, new_dirid);
|
||||
/*
|
||||
* insert the directory item
|
||||
*/
|
||||
@ -2489,12 +2488,10 @@ static long btrfs_ioctl_trans_start(struct file *file)
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
mutex_lock(&root->fs_info->trans_mutex);
|
||||
root->fs_info->open_ioctl_trans++;
|
||||
mutex_unlock(&root->fs_info->trans_mutex);
|
||||
atomic_inc(&root->fs_info->open_ioctl_trans);
|
||||
|
||||
ret = -ENOMEM;
|
||||
trans = btrfs_start_ioctl_transaction(root, 0);
|
||||
trans = btrfs_start_ioctl_transaction(root);
|
||||
if (IS_ERR(trans))
|
||||
goto out_drop;
|
||||
|
||||
@ -2502,9 +2499,7 @@ static long btrfs_ioctl_trans_start(struct file *file)
|
||||
return 0;
|
||||
|
||||
out_drop:
|
||||
mutex_lock(&root->fs_info->trans_mutex);
|
||||
root->fs_info->open_ioctl_trans--;
|
||||
mutex_unlock(&root->fs_info->trans_mutex);
|
||||
atomic_dec(&root->fs_info->open_ioctl_trans);
|
||||
mnt_drop_write(file->f_path.mnt);
|
||||
out:
|
||||
return ret;
|
||||
@ -2738,9 +2733,7 @@ long btrfs_ioctl_trans_end(struct file *file)
|
||||
|
||||
btrfs_end_transaction(trans, root);
|
||||
|
||||
mutex_lock(&root->fs_info->trans_mutex);
|
||||
root->fs_info->open_ioctl_trans--;
|
||||
mutex_unlock(&root->fs_info->trans_mutex);
|
||||
atomic_dec(&root->fs_info->open_ioctl_trans);
|
||||
|
||||
mnt_drop_write(file->f_path.mnt);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user