Attribute names of parent pointers are not strings. So avoid doing namechecks for these attributes. Signed-off-by: Allison Henderson <allison.henderson@xxxxxxxxxx> --- repair/attr_repair.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/repair/attr_repair.c b/repair/attr_repair.c index 8b1b8a7..b8b0768 100644 --- a/repair/attr_repair.c +++ b/repair/attr_repair.c @@ -308,8 +308,9 @@ process_shortform_attr( /* namecheck checks for / and null terminated for file names. * attributes names currently follow the same rules. */ - if (namecheck((char *)¤tentry->nameval[0], - currententry->namelen)) { + if (!(currententry->flags & XFS_ATTR_PARENT) && + namecheck((char *)¤tentry->nameval[0], + currententry->namelen)) { do_warn( _("entry contains illegal character in shortform attribute name\n")); junkit = 1; @@ -470,8 +471,9 @@ process_leaf_attr_local( xfs_attr_leaf_name_local_t *local; local = xfs_attr3_leaf_name_local(leaf, i); - if (local->namelen == 0 || namecheck((char *)&local->nameval[0], - local->namelen)) { + if (!(entry->flags & XFS_ATTR_PARENT) && + (local->namelen == 0 || namecheck((char *)&local->nameval[0], + local->namelen))) { do_warn( _("attribute entry %d in attr block %u, inode %" PRIu64 " has bad name (namelen = %d)\n"), i, da_bno, ino, local->namelen); @@ -525,13 +527,15 @@ process_leaf_attr_remote( remotep = xfs_attr3_leaf_name_remote(leaf, i); - if (remotep->namelen == 0 || namecheck((char *)&remotep->name[0], - remotep->namelen) || + if (!(entry->flags & XFS_ATTR_PARENT) && + (remotep->namelen == 0 || + namecheck((char *)&remotep->name[0], + remotep->namelen) || be32_to_cpu(entry->hashval) != libxfs_da_hashname((unsigned char *)&remotep->name[0], remotep->namelen) || be32_to_cpu(entry->hashval) < last_hashval || - be32_to_cpu(remotep->valueblk) == 0) { + be32_to_cpu(remotep->valueblk) == 0)) { do_warn( _("inconsistent remote attribute entry %d in attr block %u, ino %" PRIu64 "\n"), i, da_bno, ino); return -1; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html