summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/replicas.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/replicas.c')
-rw-r--r--fs/bcachefs/replicas.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c
index d4c1d43e8c41..5b591c59bc3e 100644
--- a/fs/bcachefs/replicas.c
+++ b/fs/bcachefs/replicas.c
@@ -462,6 +462,9 @@ int bch2_replicas_gc_end(struct bch_fs *c, int ret)
{
lockdep_assert_held(&c->replicas_gc_lock);
+ if (ret)
+ goto err;
+
mutex_lock(&c->sb_lock);
percpu_down_write(&c->mark_lock);