Btrfs: remove non-sense btrfs_error_discard_extent() function
authorFilipe Manana <fdmanana@suse.com>
Mon, 8 Dec 2014 14:01:12 +0000 (14:01 +0000)
committerChris Mason <clm@fb.com>
Wed, 10 Dec 2014 20:22:32 +0000 (12:22 -0800)
It doesn't do anything special, it just calls btrfs_discard_extent(),
so just remove it.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c

index e6fbbd74b716ae69da265779af5317c0057f1a18..7e607416755a880fef1a06d3a8a3482417c0b364 100644 (file)
@@ -3481,8 +3481,8 @@ void btrfs_put_block_group_cache(struct btrfs_fs_info *info);
 u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo);
 int btrfs_error_unpin_extent_range(struct btrfs_root *root,
                                   u64 start, u64 end);
-int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr,
-                              u64 num_bytes, u64 *actual_bytes);
+int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr,
+                        u64 num_bytes, u64 *actual_bytes);
 int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans,
                            struct btrfs_root *root, u64 type);
 int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range);
index 4f3c03d9a57531f65e8c85d3752e23eb7260e616..a80b97100d90b3162d7d3688ed6b3c459bb56bc8 100644 (file)
@@ -1889,8 +1889,8 @@ static int btrfs_issue_discard(struct block_device *bdev,
        return blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_NOFS, 0);
 }
 
-static int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr,
-                               u64 num_bytes, u64 *actual_bytes)
+int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr,
+                        u64 num_bytes, u64 *actual_bytes)
 {
        int ret;
        u64 discarded_bytes = 0;
@@ -9698,12 +9698,6 @@ int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end)
        return unpin_extent_range(root, start, end, false);
 }
 
-int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr,
-                              u64 num_bytes, u64 *actual_bytes)
-{
-       return btrfs_discard_extent(root, bytenr, num_bytes, actual_bytes);
-}
-
 int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range)
 {
        struct btrfs_fs_info *fs_info = root->fs_info;
index edf32c5bbef1de7e770b46fbfc05c5aee7474f9c..d6c03f7f136b359c534668a38f9e9a72d299eb66 100644 (file)
@@ -2966,8 +2966,8 @@ static int do_trimming(struct btrfs_block_group_cache *block_group,
        spin_unlock(&block_group->lock);
        spin_unlock(&space_info->lock);
 
-       ret = btrfs_error_discard_extent(fs_info->extent_root,
-                                        start, bytes, &trimmed);
+       ret = btrfs_discard_extent(fs_info->extent_root,
+                                  start, bytes, &trimmed);
        if (!ret)
                *total_trimmed += trimmed;