summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2012-03-27 17:09:17 +0300
committerIlya Dryomov <idryomov@gmail.com>2012-03-27 17:09:17 +0300
commit0c460c0d70e10463e44bdf1d406e9c5ec03b1af6 (patch)
tree8c28962481b64a3dcabb2294094435832a23516d /fs/btrfs/ctree.h
parente8920a640be5d4ebe3fee0670639a81d4ffc904c (diff)
downloadop-kernel-dev-0c460c0d70e10463e44bdf1d406e9c5ec03b1af6.zip
op-kernel-dev-0c460c0d70e10463e44bdf1d406e9c5ec03b1af6.tar.gz
Btrfs: move alloc_profile_is_valid() to volumes.c
Header file is not a good place to define functions. This also moves a call to alloc_profile_is_valid() down the stack and removes a redundant check from __btrfs_alloc_chunk() - alloc_profile_is_valid() takes it into account. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index f057e92..a56e1e0 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2734,29 +2734,6 @@ static inline void free_fs_info(struct btrfs_fs_info *fs_info)
kfree(fs_info->super_for_commit);
kfree(fs_info);
}
-/**
- * alloc_profile_is_valid - see if a given profile is valid and reduced
- * @flags: profile to validate
- * @extended: if true @flags is treated as an extended profile
- */
-static inline int alloc_profile_is_valid(u64 flags, int extended)
-{
- u64 mask = (extended ? BTRFS_EXTENDED_PROFILE_MASK :
- BTRFS_BLOCK_GROUP_PROFILE_MASK);
-
- flags &= ~BTRFS_BLOCK_GROUP_TYPE_MASK;
-
- /* 1) check that all other bits are zeroed */
- if (flags & ~mask)
- return 0;
-
- /* 2) see if profile is reduced */
- if (flags == 0)
- return !extended; /* "0" is valid for usual profiles */
-
- /* true if exactly one bit set */
- return (flags & (flags - 1)) == 0;
-}
/* root-item.c */
int btrfs_find_root_ref(struct btrfs_root *tree_root,
OpenPOWER on IntegriCloud