]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
metadump: include NULLFSINO check in inode copy code
authorBrian Foster <bfoster@redhat.com>
Tue, 24 Feb 2015 00:19:31 +0000 (11:19 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 24 Feb 2015 00:19:31 +0000 (11:19 +1100)
The copy_ino() function includes a check for effectively NULL inode
numbers. It checks for 0 but does not include NULLFSINO. This leads to
spurious warnings in some instances. For example, copy_ino() is called
unconditionally for sb quota inodes from copy_sb_inodes(), values of
which can be NULLFSINO.

Check for NULLFSINO and return quietly from copy_ino().

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/metadump.c

index 38cd441cbeba291092298c253d2b10d6648857c7..6bd10a8a857facd770176dc73d7e091e021b5ceb 100644 (file)
@@ -2112,7 +2112,7 @@ copy_ino(
        int                     offset;
        int                     rval = 0;
 
-       if (ino == 0)
+       if (ino == 0 || ino == NULLFSINO)
                return 1;
 
        agno = XFS_INO_TO_AGNO(mp, ino);