diff options
author | Daniel Hill <daniel@gluo.nz> | 2022-07-14 09:58:23 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:35 +0300 |
commit | 8bfe14e86a00a44eb7bfbeff1d7368e44c93bb7c (patch) | |
tree | c2393a82af70ff50b51acad7aed757722f2e1808 /fs/bcachefs/btree_locking.h | |
parent | 43de721a33b214b253c07672c4c6ba7548f2d3e7 (diff) | |
download | linux-8bfe14e86a00a44eb7bfbeff1d7368e44c93bb7c.tar.xz |
bcachefs: lock time stats prep work.
We need the caller name and a place to store our results, btree_trans provides this.
Signed-off-by: Daniel Hill <daniel@gluo.nz>
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 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 4a87fa625d7a..230f376993ae 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -94,7 +94,8 @@ btree_lock_want(struct btree_path *path, int level) return BTREE_NODE_UNLOCKED; } -static inline void btree_node_unlock(struct btree_path *path, unsigned level) +static inline void btree_node_unlock(struct btree_trans *trans, + struct btree_path *path, unsigned level) { int lock_type = btree_node_locked_type(path, level); @@ -105,12 +106,13 @@ static inline void btree_node_unlock(struct btree_path *path, unsigned level) mark_btree_node_unlocked(path, level); } -static inline void __bch2_btree_path_unlock(struct btree_path *path) +static inline void __bch2_btree_path_unlock(struct btree_trans *trans, + struct btree_path *path) { btree_path_set_dirty(path, BTREE_ITER_NEED_RELOCK); while (path->nodes_locked) - btree_node_unlock(path, __ffs(path->nodes_locked)); + btree_node_unlock(trans, path, __ffs(path->nodes_locked)); } static inline enum bch_time_stats lock_to_time_stat(enum six_lock_type type) |