Skip to content

Commit b799220

Browse files
author
Kent Overstreet
committed
bcachefs: Add missing synchronize_srcu_expedited() call when shutting down
We use the polling interface to srcu for tracking pending frees; when shutting down we don't need to wait for an srcu barrier to free them, but SRCU still gets confused if we shutdown with an outstanding grace period. Reported-by: [email protected] Reported-by: [email protected] Signed-off-by: Kent Overstreet <[email protected]>
1 parent 9432e90 commit b799220

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/bcachefs/btree_iter.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3401,8 +3401,10 @@ void bch2_fs_btree_iter_exit(struct bch_fs *c)
34013401
bch2_time_stats_exit(&s->lock_hold_times);
34023402
}
34033403

3404-
if (c->btree_trans_barrier_initialized)
3404+
if (c->btree_trans_barrier_initialized) {
3405+
synchronize_srcu_expedited(&c->btree_trans_barrier);
34053406
cleanup_srcu_struct(&c->btree_trans_barrier);
3407+
}
34063408
mempool_exit(&c->btree_trans_mem_pool);
34073409
mempool_exit(&c->btree_trans_pool);
34083410
}

0 commit comments

Comments
 (0)