xfs
[Top] [All Lists]

[PATCH 04/13] xfs_db: nlink fields are valid for di_version == 3, too

To: xfs@xxxxxxxxxxx
Subject: [PATCH 04/13] xfs_db: nlink fields are valid for di_version == 3, too
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Tue, 17 Mar 2015 15:33:06 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1426624395-8258-1-git-send-email-sandeen@xxxxxxxxxx>
References: <1426624395-8258-1-git-send-email-sandeen@xxxxxxxxxx>
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@xxxxxxxxxx>
Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
---
 db/inode.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/db/inode.c b/db/inode.c
index 982acb7..c26e1a0 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
-- 
1.7.1

<Prev in Thread] Current Thread [Next in Thread>