]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: check if the transaction was aborted at btrfs_wait_for_commit()
authorFilipe Manana <fdmanana@suse.com>
Fri, 21 Jul 2023 09:49:20 +0000 (10:49 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Jul 2023 16:06:27 +0000 (18:06 +0200)
commitbf7ecbe9875061bf3fce1883e3b26b77f847d1e8
treeb87906379747e25ecde5e04177a20a3ff8bd9570
parentd8ccbd21918fd7fa6ce3226cffc22c444228e8ad
btrfs: check if the transaction was aborted at btrfs_wait_for_commit()

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@vger.kernel.org # 4.19+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c