From: Eric Sandeen Date: Mon, 15 Sep 2014 23:23:40 +0000 (+1000) Subject: xfs_repair: preserve error state in process_shortform_attr X-Git-Tag: v3.2.2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50aeb09de6b7263912f68e061e8fdbe417592e3d;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: preserve error state in process_shortform_attr process_shortform_attr uses the "junkit" error to track whether an error was found, but by assigning it directly to the result of valuecheck, previous errors are ignored, leading to unrepairable errors of the form i.e. "entry has INCOMPLETE flag on in shortform attribute" or "entry contains illegal character in shortform attribute name" Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner --- diff --git a/repair/attr_repair.c b/repair/attr_repair.c index a27a3ecd0..d60b66478 100644 --- a/repair/attr_repair.c +++ b/repair/attr_repair.c @@ -914,7 +914,8 @@ process_shortform_attr( /* Only check values for root security attributes */ if (currententry->flags & XFS_ATTR_ROOT) - junkit = valuecheck(mp, (char *)¤tentry->nameval[0], + junkit |= valuecheck(mp, + (char *)¤tentry->nameval[0], NULL, currententry->namelen, currententry->valuelen);