]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: preserve error state in process_shortform_attr
authorEric Sandeen <sandeen@redhat.com>
Mon, 15 Sep 2014 23:23:40 +0000 (09:23 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 15 Sep 2014 23:23:40 +0000 (09:23 +1000)
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 <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/attr_repair.c

index a27a3ecd02da21b76fe2358da58893e618c98328..d60b66478b82d5b8f1340a4a1e02fd31d39d68d1 100644 (file)
@@ -914,7 +914,8 @@ process_shortform_attr(
 
                /* Only check values for root security attributes */
                if (currententry->flags & XFS_ATTR_ROOT)
-                      junkit = valuecheck(mp, (char *)&currententry->nameval[0],
+                      junkit |= valuecheck(mp,
+                                       (char *)&currententry->nameval[0],
                                        NULL, currententry->namelen, 
                                        currententry->valuelen);