diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-16 15:56:42 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:02 -0400 |
commit | 32913f49f54f0cf9ccf581e3abd2d1fc6ba4debf (patch) | |
tree | af06267093004fd58dc0e639842e0fb4575d5614 /fs/bcachefs/btree_locking.h | |
parent | 2804d0f15bda386fa86c7b6b432edb758e785bce (diff) | |
download | lwn-32913f49f54f0cf9ccf581e3abd2d1fc6ba4debf.tar.gz lwn-32913f49f54f0cf9ccf581e3abd2d1fc6ba4debf.zip |
six locks: Seq now only incremented on unlock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r-- | fs/bcachefs/btree_locking.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index f9bb8736c061..d3837c25f110 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -175,13 +175,13 @@ bch2_btree_node_unlock_write_inlined(struct btree_trans *trans, struct btree_pat struct btree_path *linked; EBUG_ON(path->l[b->c.level].b != b); - EBUG_ON(path->l[b->c.level].lock_seq + 1 != six_lock_seq(&b->c.lock)); + EBUG_ON(path->l[b->c.level].lock_seq != six_lock_seq(&b->c.lock)); EBUG_ON(btree_node_locked_type(path, b->c.level) != SIX_LOCK_write); mark_btree_node_locked_noreset(path, b->c.level, SIX_LOCK_intent); trans_for_each_path_with_node(trans, b, linked) - linked->l[b->c.level].lock_seq += 2; + linked->l[b->c.level].lock_seq++; six_unlock_write(&b->c.lock); } |