]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_db: nlink fields are valid for di_version == 3, too
authorEric Sandeen <sandeen@redhat.com>
Mon, 6 Apr 2015 23:19:41 +0000 (09:19 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 6 Apr 2015 23:19:41 +0000 (09:19 +1000)
Printing inodes with di_version == 3 skips the nlink
fields, because they are only printed if di_version == 2.
This was intended to separate them from di_version == 1,
but it mistakenly excluded di_version == 3, which also contains
these fields.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/inode.c

index 4f9c65df2e69888b2b011c6b6088b8efd0d84740..dfefbf5f876a16c5b4247c7d5eed6728550c05fd 100644 (file)
@@ -369,7 +369,7 @@ inode_core_nlinkv2_count(
        ASSERT(startoff == 0);
        ASSERT(obj == iocur_top->data);
        dic = obj;
-       return dic->di_version == 2;
+       return dic->di_version >= 2;
 }
 
 static int
@@ -382,7 +382,7 @@ inode_core_onlink_count(
        ASSERT(startoff == 0);
        ASSERT(obj == iocur_top->data);
        dic = obj;
-       return dic->di_version == 2;
+       return dic->di_version >= 2;
 }
 
 static int
@@ -395,7 +395,7 @@ inode_core_projid_count(
        ASSERT(startoff == 0);
        ASSERT(obj == iocur_top->data);
        dic = obj;
-       return dic->di_version == 2;
+       return dic->di_version >= 2;
 }
 
 static int