__BTRFS_LAF_DATA_SIZE is used only by BTRFS_LEAF_DATA_SIZE. Make the latter
subsume the former.

Signed-off-by: Nikolay Borisov <nbori...@suse.com>
---
 fs/btrfs/ctree.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 292c94c45df0..75128bd23140 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1277,19 +1277,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);
 }
 
 static inline unsigned long BTRFS_LEAF_DATA_OFFSET(void)
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to