Skip to content
Commit 56a0e706 authored by Liu Bo's avatar Liu Bo Committed by David Sterba
Browse files

Btrfs: bail out gracefully rather than BUG_ON



If a file's DIR_ITEM key is invalid (due to memory errors) and gets
written to disk, a future lookup_path can end up with kernel panic due
to BUG_ON().

This gets rid of the BUG_ON(), meanwhile output the corrupted key and
return ENOENT if it's invalid.

Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reported-by: default avatarGuillaume Bouchard <bouchard@mercs-eng.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 619c47f3
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