• Filipe Manana's avatar
    btrfs: do not BUG_ON() when dropping inode items from log root · fc4026e2
    Filipe Manana authored
    When dropping inode items from a log tree at drop_inode_items(), we this
    BUG_ON() on the result of btrfs_search_slot() because we don't expect an
    exact match since having a key with an offset of (u64)-1 is unexpected.
    That is generally true, but for dir index keys for example, we can get a
    key with such an offset value, even though it's very unlikely and it would
    take ages to increase the sequence counter for a dir index up to (u64)-1.
    We can deal with an exact match, we just have to delete the key at that
    slot, so there is really no need to BUG_ON(), error out or trigger any
    warning. So remove the BUG_ON().
    Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
    Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    fc4026e2
tree-log.c 210 KB