diff options
author | 2025-04-15 13:33:06 +0800 | |
---|---|---|
committer | 2025-05-21 20:14:14 -0400 | |
commit | 152bae193c480d53283541f5e4e2d1100f8500d3 (patch) | |
tree | 8396936c994fbd356812fb9c4a0402e96d3cbd0e | |
parent | bcachefs: Kill bch2_trans_unlock_noassert (diff) | |
download | wireguard-linux-152bae193c480d53283541f5e4e2d1100f8500d3.tar.xz wireguard-linux-152bae193c480d53283541f5e4e2d1100f8500d3.zip |
bcachefs: Remove spurious +1/-1 operation
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/btree_types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h index 325b9834134a..3acccca3b3a3 100644 --- a/fs/bcachefs/btree_types.h +++ b/fs/bcachefs/btree_types.h @@ -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; |