mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
bcachefs: Fix null ptr deref in invalidate_one_bucket()
bch2_backpointer_get_key() returns bkey_s_c_null when the target isn't found. backpointer_get_key() flags the error, so there's nothing else to do here - just skip it and move on. Link: https://github.com/koverstreet/bcachefs/issues/847 Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
83d539b1b0
commit
39ebd74864
|
|
@ -2084,6 +2084,9 @@ static int invalidate_one_bp(struct btree_trans *trans,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!extent_k.k)
|
||||
return 0;
|
||||
|
||||
struct bkey_i *n =
|
||||
bch2_bkey_make_mut(trans, &extent_iter, &extent_k,
|
||||
BTREE_UPDATE_internal_snapshot_node);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user