summaryrefslogtreecommitdiff
path: root/check/mode-lowmem.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-01-19 15:25:36 +0800
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:32:03 +0200
commita8070228abaf81016dc9f8ee71aa585d826776b1 (patch)
treebd76ee0becbaa4b58aa22d41125fafad3a096871 /check/mode-lowmem.h
parent87103ff3412bcf1d6bddda2544f42da62243cc62 (diff)
btrfs-progs: dir-item: Make btrfs_delete_one_dir_name more robust to handle corrupted name len
Function btrfs_delete_one_dir_name() will check if the dir_item is the last content of the item, and delete the whole item if needed. However if @name_len of one dir_item/dir_index is corrupted and larger than the item size, the function will still try to treat it as partly remove, which will screw up the whole leaf. This patch will enhance the item deletion check, to cover corrupted name len, so in that case we just delete the whole item. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'check/mode-lowmem.h')
0 files changed, 0 insertions, 0 deletions