* [PATCH] btrfs: remove duplicate journal_info reset on failure to commit transaction
@ 2026-04-01 18:55 fdmanana
2026-04-02 4:56 ` Anand Jain
0 siblings, 1 reply; 2+ messages in thread
From: fdmanana @ 2026-04-01 18:55 UTC (permalink / raw)
To: linux-btrfs
From: Filipe Manana <fdmanana@suse.com>
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().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
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;
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: remove duplicate journal_info reset on failure to commit transaction
2026-04-01 18:55 [PATCH] btrfs: remove duplicate journal_info reset on failure to commit transaction fdmanana
@ 2026-04-02 4:56 ` Anand Jain
0 siblings, 0 replies; 2+ messages in thread
From: Anand Jain @ 2026-04-02 4:56 UTC (permalink / raw)
To: fdmanana, linux-btrfs
Looks good.
Reviewed-by: Anand Jain <asj@kernel.org>
On 2/4/26 02:55, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> 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().
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---
> 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-02 4:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01 18:55 [PATCH] btrfs: remove duplicate journal_info reset on failure to commit transaction fdmanana
2026-04-02 4:56 ` Anand Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox