Skip to contentSkip to conversation

Btrfs: reset intwrite on transaction abort

PATCH New Josef Bacik 1 participant 1 message Sep 21, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/btrfs/transaction.c | 2 ++
 1 file changed, 2 insertions(+)
fs/btrfs/transaction.c +2 -0
index e7a9535..2fa7017 100644
@@ -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);
 
Signature · 1 line
1.8.3.1