diff options
Diffstat (limited to 'libbcachefs/recovery_passes.c')
-rw-r--r-- | libbcachefs/recovery_passes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbcachefs/recovery_passes.c b/libbcachefs/recovery_passes.c index 4a59f52f..73339a0a 100644 --- a/libbcachefs/recovery_passes.c +++ b/libbcachefs/recovery_passes.c @@ -193,6 +193,8 @@ int bch2_run_online_recovery_passes(struct bch_fs *c) { int ret = 0; + down_read(&c->state_lock); + for (unsigned i = 0; i < ARRAY_SIZE(recovery_pass_fns); i++) { struct recovery_pass_fn *p = recovery_pass_fns + i; @@ -208,6 +210,8 @@ int bch2_run_online_recovery_passes(struct bch_fs *c) break; } + up_read(&c->state_lock); + return ret; } |