From: Kent Overstreet Date: Wed, 11 Jun 2025 02:32:14 +0000 (-0400) Subject: bcachefs: Don't trace should_be_locked unless changing X-Git-Tag: v6.16-rc2~18^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aef22f6fe7a630d536f9eaa0a7a2ed0f90ea369e;p=thirdparty%2Flinux.git bcachefs: Don't trace should_be_locked unless changing Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 9adca77e2580..f2173a3316f4 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -417,8 +417,10 @@ static inline void btree_path_set_should_be_locked(struct btree_trans *trans, st EBUG_ON(!btree_node_locked(path, path->level)); EBUG_ON(path->uptodate); - path->should_be_locked = true; - trace_btree_path_should_be_locked(trans, path); + if (!path->should_be_locked) { + path->should_be_locked = true; + trace_btree_path_should_be_locked(trans, path); + } } static inline void __btree_path_set_level_up(struct btree_trans *trans,