]> git.baikalelectronics.ru Git - kernel.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:24:13 +0000 (10:24 +0200)
commita7b85dc3164445a22ff7c073e563451f4be8e04d
treeac5978993f7264d56e78fd1e7cfa22d1e4b09edb
parentcbec34d3021d47007a0334c634f7053dbaf93d02
btrfs: check if the transaction was aborted at btrfs_wait_for_commit()

commit bf7ecbe9875061bf3fce1883e3b26b77f847d1e8 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/transaction.c