Re: [PATCH v4 3/5] btrfs: add a BTRFS_FS_ERROR helper
From: David Sterba <hidden>
Date: 2021-10-06 19:11:59
From: David Sterba <hidden>
Date: 2021-10-06 19:11:59
On Tue, Oct 05, 2021 at 04:35:25PM -0400, Josef Bacik wrote:
- if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state) || - test_bit(BTRFS_FS_STATE_TRANS_ABORTED, &fs_info->fs_state)) + if (BTRFS_FS_ERROR(fs_info))
This is not a 1:1: change as it drops the TRANS_ABORTED check. This was
added in af7227338135 ("Btrfs: clean up resources during umount after
trans is aborted") and is not specific under what circumstances it
actually is needed and not covered by the fs error.
I think the fs error should be enough and if we are a able to catch the
assertion where it's not covering the resource leak, it needs to be
fixed there. The special case without a proper explanation is strange
and I don't mind removing it.