diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-05-22 12:16:11 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-19 18:26:01 +0200 |
commit | 118c701e20ad6edfb35fd83ec6989991714b1d89 (patch) | |
tree | a8c86ce2ac74f08f76b7f56cca95dc6244205885 /fs/btrfs/ctree.h | |
parent | btrfs: rename btrfs_leaf_data to BTRFS_LEAF_DATA_OFFSET (diff) | |
download | linux-118c701e20ad6edfb35fd83ec6989991714b1d89.tar.xz linux-118c701e20ad6edfb35fd83ec6989991714b1d89.zip |
btrfs: remove __BTRFS_LEAF_DATA_SIZE
__BTRFS_LAF_DATA_SIZE is used only by BTRFS_LEAF_DATA_SIZE. Make the
latter subsume the former.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 0bc9c80f62fe..388f1128544e 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1278,19 +1278,16 @@ struct btrfs_root { /* For qgroup metadata space reserve */ atomic64_t qgroup_meta_rsv; }; + static inline u32 btrfs_inode_sectorsize(const struct inode *inode) { return btrfs_sb(inode->i_sb)->sectorsize; } -static inline u32 __BTRFS_LEAF_DATA_SIZE(u32 blocksize) -{ - return blocksize - sizeof(struct btrfs_header); -} - static inline u32 BTRFS_LEAF_DATA_SIZE(const struct btrfs_fs_info *info) { - return __BTRFS_LEAF_DATA_SIZE(info->nodesize); + + return info->nodesize - sizeof(struct btrfs_header); } #define BTRFS_LEAF_DATA_OFFSET offsetof(struct btrfs_leaf, items) |