]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/super.h
Update bcachefs sources to 8e1519ccb6 bcachefs: Add tracepoint & counter for btree...
[bcachefs-tools-debian] / libbcachefs / super.h
index 3c83e9b9cb7b6b50248a441945aee545d683cf4d..d4e939c808faf5adb95a4edf24da4b271880b0d2 100644 (file)
@@ -251,7 +251,8 @@ int bch2_fs_read_write_early(struct bch_fs *);
  */
 static inline void bch2_fs_lazy_rw(struct bch_fs *c)
 {
-       if (percpu_ref_is_zero(&c->writes))
+       if (!test_bit(BCH_FS_RW, &c->flags) &&
+           !test_bit(BCH_FS_WAS_RW, &c->flags))
                bch2_fs_read_write_early(c);
 }