summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/export.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2017-11-08 08:54:26 +0800
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:12 +0100
commitbae15d95e247f94ceb32caaf13d1d71ecbfc8735 (patch)
tree79a144412a3b0a8ecb9f5631d6f09a5a4d342625 /fs/btrfs/export.c
parentad7b0368f33cffe67fecd302028915926e50ef7e (diff)
downloadlinux-stable-bae15d95e247f94ceb32caaf13d1d71ecbfc8735.tar.gz
linux-stable-bae15d95e247f94ceb32caaf13d1d71ecbfc8735.tar.bz2
linux-stable-bae15d95e247f94ceb32caaf13d1d71ecbfc8735.zip
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>
Diffstat (limited to 'fs/btrfs/export.c')
-rw-r--r--fs/btrfs/export.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/btrfs/export.c b/fs/btrfs/export.c
index 3aeb5770f896..ddaccad469f8 100644
--- a/fs/btrfs/export.c
+++ b/fs/btrfs/export.c
@@ -283,11 +283,6 @@ static int btrfs_get_name(struct dentry *parent, char *name,
name_len = btrfs_inode_ref_name_len(leaf, iref);
}
- ret = btrfs_is_name_len_valid(leaf, path->slots[0], name_ptr, name_len);
- if (!ret) {
- btrfs_free_path(path);
- return -EIO;
- }
read_extent_buffer(leaf, name, name_ptr, name_len);
btrfs_free_path(path);