bcachefs: Fix for running in degraded mode
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 6 Dec 2018 14:58:03 +0000 (09:58 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:13 +0000 (17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal_io.c

index f3bb28f32c6e56f0576f166ab7a7bfa36aab8f32..4178dd9ceb8e91ee3e0a4a81efb5a85160a79c62 100644 (file)
@@ -1036,7 +1036,7 @@ done:
        spin_unlock(&j->lock);
        rcu_read_unlock();
 
-       return replicas >= replicas_want ? 0 : -EROFS;
+       return replicas >= c->opts.metadata_replicas_required ? 0 : -EROFS;
 }
 
 static void journal_write_compact(struct jset *jset)