Skip to content

Commit aef22f6

Browse files
author
Kent Overstreet
committed
bcachefs: Don't trace should_be_locked unless changing
Signed-off-by: Kent Overstreet <[email protected]>
1 parent cd11242 commit aef22f6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/bcachefs/btree_locking.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,10 @@ static inline void btree_path_set_should_be_locked(struct btree_trans *trans, st
417417
EBUG_ON(!btree_node_locked(path, path->level));
418418
EBUG_ON(path->uptodate);
419419

420-
path->should_be_locked = true;
421-
trace_btree_path_should_be_locked(trans, path);
420+
if (!path->should_be_locked) {
421+
path->should_be_locked = true;
422+
trace_btree_path_should_be_locked(trans, path);
423+
}
422424
}
423425

424426
static inline void __btree_path_set_level_up(struct btree_trans *trans,

0 commit comments

Comments
 (0)