Patch "btrfs: check if the transaction was aborted at btrfs_wait_for_commit()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    btrfs: check if the transaction was aborted at btrfs_wait_for_commit()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     btrfs-check-if-the-transaction-was-aborted-at-btrfs_.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 10c0df614e6969e381384226504c0fddbd43caea
Author: Filipe Manana <fdmanana@xxxxxxxx>
Date:   Fri Jul 21 10:49:20 2023 +0100

    btrfs: check if the transaction was aborted at btrfs_wait_for_commit()
    
    [ Upstream commit bf7ecbe9875061bf3fce1883e3b26b77f847d1e8 ]
    
    At btrfs_wait_for_commit() we wait for a transaction to finish and then
    always return 0 (success) without checking if it was aborted, in which
    case the transaction didn't happen due to some critical error. Fix this
    by checking if the transaction was aborted.
    
    Fixes: 462045928bda ("Btrfs: add START_SYNC, WAIT_SYNC ioctls")
    CC: stable@xxxxxxxxxxxxxxx # 4.19+
    Reviewed-by: Qu Wenruo <wqu@xxxxxxxx>
    Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>
    Reviewed-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index f2bd9f833e8d7..f2e348d22dc1e 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -776,6 +776,7 @@ int btrfs_wait_for_commit(struct btrfs_fs_info *fs_info, u64 transid)
 	}
 
 	wait_for_commit(cur_trans);
+	ret = cur_trans->aborted;
 	btrfs_put_transaction(cur_trans);
 out:
 	return ret;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux