From: Josef Bacik Date: Sat, 21 Sep 2013 02:26:29 +0000 (-0400) Subject: Btrfs: reset intwrite on transaction abort X-Git-Tag: v3.12.6~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15c7298ad21e91b0ac7e3fcf753b036d178f8c7e;p=thirdparty%2Fkernel%2Fstable.git Btrfs: reset intwrite on transaction abort commit e0228285a8cad70e4b7b4833cc650e36ecd8de89 upstream. 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 Signed-off-by: Chris Mason Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 8c81bdc1ef9ba..7138d6a3726e6 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);