Commit 9cadb4ea authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: bch2_extent_normalize() -> bch2_dev_rcu()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 8e3cc200
......@@ -986,9 +986,14 @@ void bch2_extent_ptr_set_cached(struct bkey_s k, struct bch_extent_ptr *ptr)
*/
bool bch2_extent_normalize(struct bch_fs *c, struct bkey_s k)
{
struct bch_dev *ca;
rcu_read_lock();
bch2_bkey_drop_ptrs(k, ptr,
ptr->cached &&
dev_ptr_stale(bch2_dev_bkey_exists(c, ptr->dev), ptr));
(ca = bch2_dev_rcu(c, ptr->dev)) &&
dev_ptr_stale_rcu(ca, ptr));
rcu_read_unlock();
return bkey_deleted(k.k);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment