]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/btree_gc.h
Update bcachefs sources to 0342eebf85 bcachefs: Improve the backpointer to missing...
[bcachefs-tools-debian] / libbcachefs / btree_gc.h
index 8de54005e4eaf8f299c5318b8dbd3ef7c6ba0df2..95d803b5743de5bb9e8bc5d58a868e9b795c27cf 100644 (file)
@@ -105,7 +105,8 @@ static inline bool gc_visited(struct bch_fs *c, struct gc_pos pos)
 static inline void bch2_do_gc_gens(struct bch_fs *c)
 {
        atomic_inc(&c->kick_gc);
-       wake_up_process(c->gc_thread);
+       if (c->gc_thread)
+               wake_up_process(c->gc_thread);
 }
 
 #endif /* _BCACHEFS_BTREE_GC_H */