summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-09-21 04:26:29 +0200
committerChris Mason <chris.mason@fusionio.com>2013-11-12 03:53:29 +0100
commite0228285a8cad70e4b7b4833cc650e36ecd8de89 (patch)
tree66786d96ace6df03211e077df9315b1d37a62864 /fs/btrfs/transaction.c
parentBtrfs: relocate csums properly with prealloc extents (diff)
downloadlinux-e0228285a8cad70e4b7b4833cc650e36ecd8de89.tar.xz
linux-e0228285a8cad70e4b7b4833cc650e36ecd8de89.zip
Btrfs: reset intwrite on transaction abort
If we abort a transaction in the middle of a commit we weren't undoing the intwrite locking. This patch fixes that problem. Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 8c81bdc1ef9b..7138d6a3726e 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1552,6 +1552,8 @@ static void cleanup_transaction(struct btrfs_trans_handle *trans,
root->fs_info->running_transaction = NULL;
spin_unlock(&root->fs_info->trans_lock);
+ if (trans->type & __TRANS_FREEZABLE)
+ sb_end_intwrite(root->fs_info->sb);
put_transaction(cur_trans);
put_transaction(cur_trans);