From: Eric Sandeen Date: Mon, 6 Apr 2015 23:19:41 +0000 (+1000) Subject: xfs_db: nlink fields are valid for di_version == 3, too X-Git-Tag: v3.2.3-rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6367f2a3cbad8ac54b19da55ba44106871e44268;p=thirdparty%2Fxfsprogs-dev.git xfs_db: nlink fields are valid for di_version == 3, too 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 Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- diff --git a/db/inode.c b/db/inode.c index 4f9c65df2..dfefbf5f8 100644 --- a/db/inode.c +++ b/db/inode.c @@ -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