aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/super-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-11-21 16:15:48 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:17 -0400
commit7468c4effc8c93464ec0fd4336494312bebb8033 (patch)
treeafe9767e9ecc86a78600e47209cf598d13f9c42c /fs/bcachefs/super-io.c
parente5464a371d048865cd4fcba48879c4b37727df2e (diff)
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>
Diffstat (limited to 'fs/bcachefs/super-io.c')
-rw-r--r--fs/bcachefs/super-io.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
index 3cc5d8ea743f..170f7d46fa34 100644
--- a/fs/bcachefs/super-io.c
+++ b/fs/bcachefs/super-io.c
@@ -445,16 +445,6 @@ int bch2_sb_to_fs(struct bch_fs *c, struct bch_sb *src)
__copy_super(&c->disk_sb, src);
- if (BCH_SB_HAS_ERRORS(c->disk_sb.sb))
- set_bit(BCH_FS_ERROR, &c->flags);
- else
- clear_bit(BCH_FS_ERROR, &c->flags);
-
- if (BCH_SB_HAS_TOPOLOGY_ERRORS(c->disk_sb.sb))
- set_bit(BCH_FS_TOPOLOGY_ERROR, &c->flags);
- else
- clear_bit(BCH_FS_TOPOLOGY_ERROR, &c->flags);
-
if (BCH_SB_INITIALIZED(c->disk_sb.sb))
set_bit(BCH_FS_INITIALIZED, &c->flags);