bcachefs: Fix BCH_FS_ERROR flag handling
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 21 Nov 2021 21:15:48 +0000 (16:15 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:17 +0000 (17:09 -0400)
commit7468c4effc8c93464ec0fd4336494312bebb8033
treeafe9767e9ecc86a78600e47209cf598d13f9c42c
parente5464a371d048865cd4fcba48879c4b37727df2e
bcachefs: Fix BCH_FS_ERROR flag handling

We were setting BCH_FS_ERROR on startup if the superblock was marked as
containing errors, which is not what we wanted - BCH_FS_ERROR indicates
whether errors have been found, so that after a successful fsck we're
able to clear the error bit in the superblock.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/btree_gc.c
fs/bcachefs/super-io.c