bcachefs: Check for lru entries with time=0
These are invalid. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
d7dd3fb84f
commit
9fea089a95
@ -19,6 +19,12 @@ int bch2_lru_invalid(const struct bch_fs *c, struct bkey_s_c k,
|
|||||||
return -BCH_ERR_invalid_bkey;
|
return -BCH_ERR_invalid_bkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!k.k->p.offset) {
|
||||||
|
prt_printf(err, "lru entry at time=0");
|
||||||
|
return -BCH_ERR_invalid_bkey;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user