From e1194226bf7642cab9d45f32fff4ea600c9069cc Mon Sep 17 00:00:00 2001 From: Filipe Manana Date: Wed, 1 Apr 2026 19:46:59 +0100 Subject: [PATCH] btrfs: remove duplicate journal_info reset on failure to commit transaction If we get an error during the transaction commit path, we are resetting current->journal_info to NULL twice - once in btrfs_commit_transaction() right before calling cleanup_transaction() and then once again inside cleanup_transaction(). Remove the instance in btrfs_commit_transaction(). Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Signed-off-by: David Sterba --- fs/btrfs/transaction.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c9c316ce4bdc..248adb785051 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -2657,8 +2657,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) btrfs_trans_release_chunk_metadata(trans); trans->block_rsv = NULL; btrfs_warn(fs_info, "Skipping commit of aborted transaction."); - if (current->journal_info == trans) - current->journal_info = NULL; cleanup_transaction(trans, ret); return ret;