mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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:
parent
ad7b0368f3
commit
bae15d95e2
9 changed files with 9 additions and 186 deletions
|
@ -5907,7 +5907,6 @@ static int btrfs_filldir(void *addr, int entries, struct dir_context *ctx)
|
|||
static int btrfs_real_readdir(struct file *file, struct dir_context *ctx)
|
||||
{
|
||||
struct inode *inode = file_inode(file);
|
||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
struct btrfs_file_private *private = file->private_data;
|
||||
struct btrfs_dir_item *di;
|
||||
|
@ -5975,9 +5974,6 @@ again:
|
|||
if (btrfs_should_delete_dir_index(&del_list, found_key.offset))
|
||||
goto next;
|
||||
di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item);
|
||||
if (verify_dir_item(fs_info, leaf, slot, di))
|
||||
goto next;
|
||||
|
||||
name_len = btrfs_dir_name_len(leaf, di);
|
||||
if ((total_len + sizeof(struct dir_entry) + name_len) >=
|
||||
PAGE_SIZE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue