diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-17 04:35:29 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 17:47:37 +0100 |
commit | 1ae8a0904a6a7b16ee2ffa30153d4e5c38719321 (patch) | |
tree | 87d3fe839acb723caa27d6d7aa996e888820b371 /fs/bcachefs/btree_iter.h | |
parent | bcachefs: Add a tracepoint for journal entry close (diff) | |
download | linux-1ae8a0904a6a7b16ee2ffa30153d4e5c38719321.tar.xz linux-1ae8a0904a6a7b16ee2ffa30153d4e5c38719321.zip |
bcachefs: Kill memset() in bch2_btree_iter_init()
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 | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 7286f92b1974..064720171551 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -445,14 +445,17 @@ static inline void bch2_trans_iter_init_common(struct btree_trans *trans, unsigned flags, unsigned long ip) { - memset(iter, 0, sizeof(*iter)); - iter->trans = trans; - iter->btree_id = btree_id; - iter->flags = flags; - iter->snapshot = pos.snapshot; - iter->pos = pos; - iter->k.p = pos; - + iter->trans = trans; + iter->update_path = NULL; + iter->key_cache_path = NULL; + iter->btree_id = btree_id; + iter->min_depth = 0; + iter->flags = flags; + iter->snapshot = pos.snapshot; + iter->pos = pos; + iter->k = POS_KEY(pos); + iter->journal_idx = 0; + iter->journal_pos = POS_MIN; #ifdef CONFIG_BCACHEFS_DEBUG iter->ip_allocated = ip; #endif |