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_iter.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_iter.h')
-rw-r--r-- | fs/bcachefs/btree_iter.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 9e3a5f94831c..209b89dd1d2b 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -228,14 +228,15 @@ static inline bool bch2_btree_path_upgrade(struct btree_trans *trans, : path->uptodate == BTREE_ITER_UPTODATE; } -void __bch2_btree_path_downgrade(struct btree_path *, unsigned); +void __bch2_btree_path_downgrade(struct btree_trans *, struct btree_path *, unsigned); -static inline void bch2_btree_path_downgrade(struct btree_path *path) +static inline void bch2_btree_path_downgrade(struct btree_trans *trans, + struct btree_path *path) { unsigned new_locks_want = path->level + !!path->intent_ref; if (path->locks_want > new_locks_want) - __bch2_btree_path_downgrade(path, new_locks_want); + __bch2_btree_path_downgrade(trans, path, new_locks_want); } void bch2_trans_downgrade(struct btree_trans *); |