diff mbox

[1/6] Btrfs-progs: fsck: switch to is_fstree()

Message ID 1403141229-25565-1-git-send-email-wangsl.fnst@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Wang Shilong June 19, 2014, 1:27 a.m. UTC
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
---
 cmds-check.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/cmds-check.c b/cmds-check.c
index c56da2a..26baab0 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -2049,13 +2049,10 @@  skip_walking:
 
 static int fs_root_objectid(u64 objectid)
 {
-	if (objectid == BTRFS_FS_TREE_OBJECTID ||
-	    objectid == BTRFS_TREE_RELOC_OBJECTID ||
-	    objectid == BTRFS_DATA_RELOC_TREE_OBJECTID ||
-	    (objectid >= BTRFS_FIRST_FREE_OBJECTID &&
-	     objectid <= BTRFS_LAST_FREE_OBJECTID))
+	if (objectid == BTRFS_TREE_RELOC_OBJECTID ||
+	    objectid == BTRFS_DATA_RELOC_TREE_OBJECTID)
 		return 1;
-	return 0;
+	return is_fstree(objectid);
 }
 
 static int check_fs_roots(struct btrfs_root *root,