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
31381636
Commit
31381636
authored
Jan 24, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_trans_relock_notrace()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
ee2c6ea7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+1
-1
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_iter.h
+1
-0
fs/bcachefs/btree_locking.c
fs/bcachefs/btree_locking.c
+15
-0
No files found.
fs/bcachefs/alloc_background.c
View file @
31381636
...
...
@@ -995,7 +995,7 @@ static int bch2_discard_one_bucket(struct btree_trans *trans,
GFP_KERNEL
);
*
discard_pos_done
=
iter
.
pos
;
ret
=
bch2_trans_relock
(
trans
);
ret
=
bch2_trans_relock
_notrace
(
trans
);
if
(
ret
)
goto
out
;
}
...
...
fs/bcachefs/btree_iter.h
View file @
31381636
...
...
@@ -206,6 +206,7 @@ int bch2_btree_path_relock_intent(struct btree_trans *, struct btree_path *);
void
bch2_path_put
(
struct
btree_trans
*
,
struct
btree_path
*
,
bool
);
int
bch2_trans_relock
(
struct
btree_trans
*
);
int
bch2_trans_relock_notrace
(
struct
btree_trans
*
);
void
bch2_trans_unlock
(
struct
btree_trans
*
);
bool
bch2_trans_locked
(
struct
btree_trans
*
);
...
...
fs/bcachefs/btree_locking.c
View file @
31381636
...
...
@@ -691,6 +691,21 @@ int bch2_trans_relock(struct btree_trans *trans)
return
0
;
}
int
bch2_trans_relock_notrace
(
struct
btree_trans
*
trans
)
{
struct
btree_path
*
path
;
if
(
unlikely
(
trans
->
restarted
))
return
-
((
int
)
trans
->
restarted
);
trans_for_each_path
(
trans
,
path
)
if
(
path
->
should_be_locked
&&
!
bch2_btree_path_relock_norestart
(
trans
,
path
,
_RET_IP_
))
{
return
btree_trans_restart
(
trans
,
BCH_ERR_transaction_restart_relock
);
}
return
0
;
}
void
bch2_trans_unlock
(
struct
btree_trans
*
trans
)
{
struct
btree_path
*
path
;
...
...
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