On Thu, May 25, 2017 at 10:09:07AM +0800, Su Yue wrote:
> @@ -472,6 +474,15 @@ int verify_dir_item(struct btrfs_fs_info *fs_info,
> return 1;
> }
>
> + namelen = btrfs_dir_name_len(leaf, dir_item);
> + namelen_ret = btrfs_check_namelen(leaf, slot,
> + (unsigned long)(dir_item + 1), namelen);
> + if (namelen_ret != namelen) {
> + btrfs_crit(fs_info, "invalid dir item name len: %u",
> + (unsigned)btrfs_dir_name_len(leaf, dir_item));
> + return 1;
> + }
Extending verify_dir_item is ok, as we always have the slot parameter to
pass, no problem here.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html