Skip to content

Commit 37bb9c9

Browse files
author
Kent Overstreet
committed
bcachefs: Fix locking in bch2_alloc_write_key()
Signed-off-by: Kent Overstreet <[email protected]>
1 parent 264b501 commit 37bb9c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/btree_gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,11 +1392,11 @@ static int bch2_alloc_write_key(struct btree_trans *trans,
13921392
*old,
13931393
b->data_type);
13941394
gc = *b;
1395-
percpu_up_read(&c->mark_lock);
13961395

13971396
if (gc.data_type != old_gc.data_type ||
13981397
gc.dirty_sectors != old_gc.dirty_sectors)
13991398
bch2_dev_usage_update_m(c, ca, &old_gc, &gc);
1399+
percpu_up_read(&c->mark_lock);
14001400

14011401
if (metadata_only &&
14021402
gc.data_type != BCH_DATA_sb &&

0 commit comments

Comments
 (0)