]> Git Repo - linux.git/commit
Btrfs: detect corruption when non-root leaf has zero item
authorLiu Bo <[email protected]>
Tue, 23 Aug 2016 22:22:58 +0000 (15:22 -0700)
committerChris Mason <[email protected]>
Thu, 25 Aug 2016 10:58:31 +0000 (03:58 -0700)
commit1ba98d086fe3a14d6a31f2f66dbab70c45d00f63
treec521349d7730ec47b60fe78a63822123c0fcf87d
parent053ab70f0604224c7893b43f9d9d5efa283580d6
Btrfs: detect corruption when non-root leaf has zero item

Right now we treat leaf which has zero item as a valid one
because we could have an empty tree, that is, a root that is
also a leaf without any item, however, in the same case but
when the leaf is not a root, we can end up with hitting the
BUG_ON(1) in btrfs_extend_item() called by
setup_inline_extent_backref().

This makes us check the situation as a corruption if leaf is
not its own root.

Signed-off-by: Liu Bo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
fs/btrfs/disk-io.c
This page took 0.052821 seconds and 4 git commands to generate.