]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: fsck: Fix oops in key_visible_in_snapshot()
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 17 Jun 2025 20:49:40 +0000 (16:49 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 18 Jun 2025 00:45:26 +0000 (20:45 -0400)
commit1df310860aa5b4d97b3cc83a1a8dee599071b72d
tree38d8a4ffaffa23d83e9e9f67a906d229b1630d55
parent3f890768dab1f97ff9bd7ebb76f4c52309401501
bcachefs: fsck: Fix oops in key_visible_in_snapshot()

The normal fsck code doesn't call key_visible_in_snapshot() with an
empty list of snapshot IDs seen (the current snapshot ID will always be
on the list), but str_hash_repair_key() ->
bch2_get_snapshot_overwrites() can, and that's totally fine as long as
we check for it.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c