]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove duplicate journal_info reset on failure to commit transaction
authorFilipe Manana <fdmanana@suse.com>
Wed, 1 Apr 2026 18:46:59 +0000 (19:46 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Apr 2026 17:42:24 +0000 (19:42 +0200)
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 <asj@kernel.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c

index c9c316ce4bdc79bc896e9a5f3274b24a43048a22..248adb785051b75757b6b433ca675625d7e9d88c 100644 (file)
@@ -2657,8 +2657,6 @@ cleanup_transaction:
        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;