Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
56522d72
Commit
56522d72
authored
Apr 25, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: fix btree_path_clone() ip_allocated
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
8bb0eddb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.c
+7
-3
No files found.
fs/bcachefs/btree_iter.c
View file @
56522d72
...
...
@@ -1233,11 +1233,14 @@ static inline void btree_path_copy(struct btree_trans *trans, struct btree_path
}
static
btree_path_idx_t
btree_path_clone
(
struct
btree_trans
*
trans
,
btree_path_idx_t
src
,
bool
intent
)
bool
intent
,
unsigned
long
ip
)
{
btree_path_idx_t
new
=
btree_path_alloc
(
trans
,
src
);
btree_path_copy
(
trans
,
trans
->
paths
+
new
,
trans
->
paths
+
src
);
__btree_path_get
(
trans
->
paths
+
new
,
intent
);
#ifdef TRACK_PATH_ALLOCATED
trans
->
paths
[
new
].
ip_allocated
=
ip
;
#endif
return
new
;
}
...
...
@@ -1246,7 +1249,7 @@ btree_path_idx_t __bch2_btree_path_make_mut(struct btree_trans *trans,
btree_path_idx_t
path
,
bool
intent
,
unsigned
long
ip
)
{
__btree_path_put
(
trans
->
paths
+
path
,
intent
);
path
=
btree_path_clone
(
trans
,
path
,
intent
);
path
=
btree_path_clone
(
trans
,
path
,
intent
,
ip
);
trans
->
paths
[
path
].
preserve
=
false
;
return
path
;
}
...
...
@@ -2491,7 +2494,8 @@ struct bkey_s_c bch2_btree_iter_peek_prev(struct btree_iter *iter)
bch2_path_put_nokeep
(
trans
,
saved_path
,
iter
->
flags
&
BTREE_ITER_intent
);
saved_path
=
btree_path_clone
(
trans
,
iter
->
path
,
iter
->
flags
&
BTREE_ITER_intent
);
iter
->
flags
&
BTREE_ITER_intent
,
_THIS_IP_
);
path
=
btree_iter_path
(
trans
,
iter
);
saved_k
=
*
k
.
k
;
saved_v
=
k
.
v
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment