mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
bcachefs: Fix an RCU splat
Writepoints are never deallocated so the rcu_read_lock() isn't really needed, but we are doing lockless list traversal. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
633632ef1b
commit
3e07a7300f
|
|
@ -683,11 +683,14 @@ static struct write_point *__writepoint_find(struct hlist_head *head,
|
|||
{
|
||||
struct write_point *wp;
|
||||
|
||||
rcu_read_lock();
|
||||
hlist_for_each_entry_rcu(wp, head, node)
|
||||
if (wp->write_point == write_point)
|
||||
return wp;
|
||||
|
||||
return NULL;
|
||||
goto out;
|
||||
wp = NULL;
|
||||
out:
|
||||
rcu_read_unlock();
|
||||
return wp;
|
||||
}
|
||||
|
||||
static inline bool too_many_writepoints(struct bch_fs *c, unsigned factor)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user