Skip to content
Commit 18b4abce authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix lifetime issue in device iterator helpers



bch2_get_next_dev() and bch2_get_next_online_dev() iterate over devices,
dropping and taking refs as they go; we can't access the previous device
(for ca->dev_idx) after we've dropped our ref to it, unless we take
rcu_read_lock() first.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 3a2d0259
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment