diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-16 22:45:46 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-17 20:53:11 -0400 |
commit | 37bb9c9572858288457614366635e8c4c1eaf8ce (patch) | |
tree | 3c19a0269e6cb9d696d2ae0506ce311beb82dfbf /fs | |
parent | 264b501f8f214d8443292dd254aa387dba59159a (diff) |
bcachefs: Fix locking in bch2_alloc_write_key()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/btree_gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index 584aee7010de..bdaed29f084a 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -1392,11 +1392,11 @@ static int bch2_alloc_write_key(struct btree_trans *trans, *old, b->data_type); gc = *b; - percpu_up_read(&c->mark_lock); if (gc.data_type != old_gc.data_type || gc.dirty_sectors != old_gc.dirty_sectors) bch2_dev_usage_update_m(c, ca, &old_gc, &gc); + percpu_up_read(&c->mark_lock); if (metadata_only && gc.data_type != BCH_DATA_sb && |