btrfs: Cleanup existing name_len checks

Since tree-checker has verified leaf when reading from disk, we don't
need the existing verify_dir_item() or btrfs_is_name_len_valid() checks.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2017-11-08 08:54:26 +08:00 committed by David Sterba
parent ad7b0368f3
commit bae15d95e2
9 changed files with 9 additions and 186 deletions

View file

@ -1059,12 +1059,6 @@ static int iterate_dir_item(struct btrfs_root *root, struct btrfs_path *path,
}
}
ret = btrfs_is_name_len_valid(eb, path->slots[0],
(unsigned long)(di + 1), name_len + data_len);
if (!ret) {
ret = -EIO;
goto out;
}
if (name_len + data_len > buf_len) {
buf_len = name_len + data_len;
if (is_vmalloc_addr(buf)) {