diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2016-08-24 00:22:58 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2016-08-25 12:58:31 +0200 |
commit | 1ba98d086fe3a14d6a31f2f66dbab70c45d00f63 (patch) | |
tree | c521349d7730ec47b60fe78a63822123c0fcf87d /fs/btrfs/tree-log.h | |
parent | Btrfs: check btree node's nritems (diff) | |
download | linux-1ba98d086fe3a14d6a31f2f66dbab70c45d00f63.tar.xz linux-1ba98d086fe3a14d6a31f2f66dbab70c45d00f63.zip |
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 <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/tree-log.h')
0 files changed, 0 insertions, 0 deletions