diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-10 19:08:30 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:37 -0400 |
commit | 315c9ba6da5b480618a80dcb91a74a86e49366bb (patch) | |
tree | 8a7baa5a0af60556fc4aad576956bf6400b538b5 /fs/bcachefs/btree_locking.h | |
parent | fd211bc71c9b4093ed39d4fc93294f9ff423febc (diff) | |
download | lwn-315c9ba6da5b480618a80dcb91a74a86e49366bb.tar.gz lwn-315c9ba6da5b480618a80dcb91a74a86e49366bb.zip |
bcachefs: BTREE_ITER_NO_NODE -> BCH_ERR codes
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r-- | fs/bcachefs/btree_locking.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 90bf5c02f504..7dcfe3009b84 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -291,4 +291,19 @@ static inline void btree_path_set_should_be_locked(struct btree_path *path) path->should_be_locked = true; } +static inline void __btree_path_set_level_up(struct btree_trans *trans, + struct btree_path *path, + unsigned l) +{ + btree_node_unlock(trans, path, l); + path->l[l].b = ERR_PTR(-BCH_ERR_no_btree_node_up); +} + +static inline void btree_path_set_level_up(struct btree_trans *trans, + struct btree_path *path) +{ + __btree_path_set_level_up(trans, path, path->level++); + btree_path_set_dirty(path, BTREE_ITER_NEED_TRAVERSE); +} + #endif /* _BCACHEFS_BTREE_LOCKING_H */ |