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
23f308ae
Commit
23f308ae
authored
Apr 30, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_dev_safe() -> bch2_dev_rcu()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
552aa548
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
fs/bcachefs/extents.c
fs/bcachefs/extents.c
+1
-1
fs/bcachefs/sb-members.c
fs/bcachefs/sb-members.c
+1
-0
fs/bcachefs/sb-members.h
fs/bcachefs/sb-members.h
+1
-1
No files found.
fs/bcachefs/extents.c
View file @
23f308ae
...
...
@@ -983,7 +983,7 @@ void bch2_extent_ptr_to_text(struct printbuf *out, struct bch_fs *c, const struc
{
out
->
atomic
++
;
rcu_read_lock
();
struct
bch_dev
*
ca
=
bch2_dev_
safe
(
c
,
ptr
->
dev
);
struct
bch_dev
*
ca
=
bch2_dev_
rcu
(
c
,
ptr
->
dev
);
if
(
!
ca
)
{
prt_printf
(
out
,
"ptr: %u:%llu gen %u%s"
,
ptr
->
dev
,
(
u64
)
ptr
->
offset
,
ptr
->
gen
,
...
...
fs/bcachefs/sb-members.c
View file @
23f308ae
...
...
@@ -3,6 +3,7 @@
#include "bcachefs.h"
#include "btree_cache.h"
#include "disk_groups.h"
#include "error.h"
#include "opts.h"
#include "replicas.h"
#include "sb-members.h"
...
...
fs/bcachefs/sb-members.h
View file @
23f308ae
...
...
@@ -210,7 +210,7 @@ static inline struct bch_dev *bch2_dev_locked(struct bch_fs *c, unsigned dev)
lockdep_is_held
(
&
c
->
state_lock
));
}
static
inline
struct
bch_dev
*
bch2_dev_
safe
(
struct
bch_fs
*
c
,
unsigned
dev
)
static
inline
struct
bch_dev
*
bch2_dev_
rcu
(
struct
bch_fs
*
c
,
unsigned
dev
)
{
return
c
&&
dev
<
c
->
sb
.
nr_devices
?
rcu_dereference
(
c
->
devs
[
dev
])
...
...
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