mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 22:19:17 -04:00
bcachefs: Remove spurious +1/-1 operation
Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
f013b4ca35
commit
152bae193c
@@ -657,13 +657,13 @@ static inline struct bset_tree *bset_tree_last(struct btree *b)
|
||||
static inline void *
|
||||
__btree_node_offset_to_ptr(const struct btree *b, u16 offset)
|
||||
{
|
||||
return (void *) ((u64 *) b->data + 1 + offset);
|
||||
return (void *) ((u64 *) b->data + offset);
|
||||
}
|
||||
|
||||
static inline u16
|
||||
__btree_node_ptr_to_offset(const struct btree *b, const void *p)
|
||||
{
|
||||
u16 ret = (u64 *) p - 1 - (u64 *) b->data;
|
||||
u16 ret = (u64 *) p - (u64 *) b->data;
|
||||
|
||||
EBUG_ON(__btree_node_offset_to_ptr(b, ret) != p);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user