]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't WARN if we abort a transaction with EROFS
authorJosef Bacik <josef@toxicpanda.com>
Tue, 21 Jul 2020 15:24:27 +0000 (11:24 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:46 +0000 (12:55 +0200)
commit3801fc51ddd8210a273bab0a741873d4ae9a49e7
treed5617a8f3013b378b7b9e58fd9b1f5da047e4d1c
parent05d3dfda83434d75ffad3a62e9a329552fddd4dd
btrfs: don't WARN if we abort a transaction with EROFS

If we got some sort of corruption via a read and call
btrfs_handle_fs_error() we'll set BTRFS_FS_STATE_ERROR on the fs and
complain.  If a subsequent trans handle trips over this it'll get EROFS
and then abort.  However at that point we're not aborting for the
original reason, we're aborting because we've been flipped read only.
We do not need to WARN_ON() here.

CC: stable@vger.kernel.org # 5.4+
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h