summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_iter.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-08 08:24:05 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 17:47:43 +0100
commitf6363acaa63a84e7e79bd6e8b926d40a940e7c81 (patch)
tree2fa59047ad4f1f11ff66eb1e7d7c27c405d84f84 /fs/bcachefs/btree_iter.h
parentbcachefs: bch2_btree_path_set_pos() -> btree_path_idx_t (diff)
downloadlinux-f6363acaa63a84e7e79bd6e8b926d40a940e7c81.tar.xz
linux-f6363acaa63a84e7e79bd6e8b926d40a940e7c81.zip
bcachefs: bch2_btree_path_make_mut() -> btree_path_idx_t
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.h')
-rw-r--r--fs/bcachefs/btree_iter.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h
index 6427791a8219..42877b00e38f 100644
--- a/fs/bcachefs/btree_iter.h
+++ b/fs/bcachefs/btree_iter.h
@@ -160,17 +160,18 @@ __trans_next_path_with_node(struct btree_trans *trans, struct btree *b,
_path = __trans_next_path_with_node((_trans), (_b), \
(_path)->idx + 1))
-struct btree_path *__bch2_btree_path_make_mut(struct btree_trans *, struct btree_path *,
- bool, unsigned long);
+btree_path_idx_t __bch2_btree_path_make_mut(struct btree_trans *, btree_path_idx_t,
+ bool, unsigned long);
-static inline struct btree_path * __must_check
+static inline btree_path_idx_t __must_check
bch2_btree_path_make_mut(struct btree_trans *trans,
- struct btree_path *path, bool intent,
+ btree_path_idx_t path, bool intent,
unsigned long ip)
{
- if (path->ref > 1 || path->preserve)
+ if (trans->paths[path].ref > 1 ||
+ trans->paths[path].preserve)
path = __bch2_btree_path_make_mut(trans, path, intent, ip);
- path->should_be_locked = false;
+ trans->paths[path].should_be_locked = false;
return path;
}