diff mbox series

[-next] btrfs: Remove unused inline function heads_to_leaves

Message ID 20200506132239.3252-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] btrfs: Remove unused inline function heads_to_leaves | expand

Commit Message

Yue Haibing May 6, 2020, 1:22 p.m. UTC
There's no callers in-tree anymore since commit 64403612b73a ("btrfs:
rework btrfs_check_space_for_delayed_refs")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/btrfs/extent-tree.c | 16 ----------------
 1 file changed, 16 deletions(-)

Comments

David Sterba May 6, 2020, 1:41 p.m. UTC | #1
On Wed, May 06, 2020 at 09:22:39PM +0800, YueHaibing wrote:
> There's no callers in-tree anymore since commit 64403612b73a ("btrfs:
> rework btrfs_check_space_for_delayed_refs")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Added to misc-next, thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index faa585d54eb7..3593f8cce9e5 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2114,22 +2114,6 @@  static u64 find_middle(struct rb_root *root)
 }
 #endif
 
-static inline u64 heads_to_leaves(struct btrfs_fs_info *fs_info, u64 heads)
-{
-	u64 num_bytes;
-
-	num_bytes = heads * (sizeof(struct btrfs_extent_item) +
-			     sizeof(struct btrfs_extent_inline_ref));
-	if (!btrfs_fs_incompat(fs_info, SKINNY_METADATA))
-		num_bytes += heads * sizeof(struct btrfs_tree_block_info);
-
-	/*
-	 * We don't ever fill up leaves all the way so multiply by 2 just to be
-	 * closer to what we're really going to want to use.
-	 */
-	return div_u64(num_bytes, BTRFS_LEAF_DATA_SIZE(fs_info));
-}
-
 /*
  * Takes the number of bytes to be csumm'ed and figures out how many leaves it
  * would require to store the csums for that many bytes.