btrfs-progs: corrupt-block: fix assertion condition

The ->data is no longer a pointer but an embedded array.

Resolves-coverity-id: 1372671
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-09-09 13:37:35 +02:00
parent c7a1f66a20
commit 7e955fc856

View File

@ -899,7 +899,7 @@ static int corrupt_item_nocow(struct btrfs_trans_handle *trans,
if (slot == 0)
del = 0;
/* Only accept valid eb */
if (!leaf->data || slot >= btrfs_header_nritems(leaf)) {
if (slot >= btrfs_header_nritems(leaf)) {
error("invalid eb: no data or slot out of range: %d >= %d",
slot, btrfs_header_nritems(leaf));
return -EINVAL;