mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 14:42:18 -04: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:
committed by
Kent Overstreet
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)
|
||||
|
||||
Reference in New Issue
Block a user