We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d293ece commit cd3b31fCopy full SHA for cd3b31f
fs/bcachefs/recovery.c
@@ -811,9 +811,11 @@ int bch2_fs_recovery(struct bch_fs *c)
811
clear_bit(BCH_FS_fsck_running, &c->flags);
812
813
/* fsync if we fixed errors */
814
- if (test_bit(BCH_FS_errors_fixed, &c->flags)) {
+ if (test_bit(BCH_FS_errors_fixed, &c->flags) &&
815
+ bch2_write_ref_tryget(c, BCH_WRITE_REF_fsync)) {
816
bch2_journal_flush_all_pins(&c->journal);
817
bch2_journal_meta(&c->journal);
818
+ bch2_write_ref_put(c, BCH_WRITE_REF_fsync);
819
}
820
821
/* If we fixed errors, verify that fs is actually clean now: */
0 commit comments