From: Qu Wenruo Date: Thu, 18 Jan 2018 07:41:15 +0000 (+0800) Subject: btrfs-progs: check: Move fs_root_objectid function to check/common.h X-Git-Tag: upstream/4.16.1~163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1b55330c249bc47983b802908240723b0e534e3;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: check: Move fs_root_objectid function to check/common.h Just another small wrapper shared between original and lowmem mode. Reviewed-by: Su Yue Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- diff --git a/check/common.h b/check/common.h index 3e0a5eb..77a0ab5 100644 --- a/check/common.h +++ b/check/common.h @@ -72,4 +72,12 @@ static inline u8 imode_to_type(u32 imode) #undef S_SHIFT } +static inline int fs_root_objectid(u64 objectid) +{ + if (objectid == BTRFS_TREE_RELOC_OBJECTID || + objectid == BTRFS_DATA_RELOC_TREE_OBJECTID) + return 1; + return is_fstree(objectid); +} + #endif diff --git a/check/main.c b/check/main.c index 79a2d59..04dd06d 100644 --- a/check/main.c +++ b/check/main.c @@ -2168,8 +2168,6 @@ out: return err; } -static int fs_root_objectid(u64 objectid); - /* * Update global fs information. */ @@ -4250,14 +4248,6 @@ skip_walking: return ret; } -static int fs_root_objectid(u64 objectid) -{ - if (objectid == BTRFS_TREE_RELOC_OBJECTID || - objectid == BTRFS_DATA_RELOC_TREE_OBJECTID) - return 1; - return is_fstree(objectid); -} - static int check_fs_roots(struct btrfs_fs_info *fs_info, struct cache_tree *root_cache) {