diff options
author | Filipe Manana <fdmanana@suse.com> | 2014-12-08 09:01:12 -0500 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-12-10 15:22:32 -0500 |
commit | 1edb647bb95439d90c0017e9ca23c4ecf00a0409 (patch) | |
tree | f73ba2db682e7352bf92d10eaa60956f285b3f84 /fs | |
parent | 678886bdc6378c1cbd5072da2c5a3035000214e3 (diff) |
Btrfs: remove non-sense btrfs_error_discard_extent() function
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.h | 4 | ||||
-rw-r--r-- | fs/btrfs/extent-tree.c | 10 | ||||
-rw-r--r-- | fs/btrfs/free-space-cache.c | 4 |
3 files changed, 6 insertions, 12 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index e6fbbd74b716..7e607416755a 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -3481,8 +3481,8 @@ void btrfs_put_block_group_cache(struct btrfs_fs_info *info); | |||
3481 | u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo); | 3481 | u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo); |
3482 | int btrfs_error_unpin_extent_range(struct btrfs_root *root, | 3482 | int btrfs_error_unpin_extent_range(struct btrfs_root *root, |
3483 | u64 start, u64 end); | 3483 | u64 start, u64 end); |
3484 | int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr, | 3484 | int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, |
3485 | u64 num_bytes, u64 *actual_bytes); | 3485 | u64 num_bytes, u64 *actual_bytes); |
3486 | int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, | 3486 | int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, |
3487 | struct btrfs_root *root, u64 type); | 3487 | struct btrfs_root *root, u64 type); |
3488 | int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range); | 3488 | int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range); |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4f3c03d9a575..a80b97100d90 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -1889,8 +1889,8 @@ static int btrfs_issue_discard(struct block_device *bdev, | |||
1889 | return blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_NOFS, 0); | 1889 | return blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_NOFS, 0); |
1890 | } | 1890 | } |
1891 | 1891 | ||
1892 | static int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, | 1892 | int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, |
1893 | u64 num_bytes, u64 *actual_bytes) | 1893 | u64 num_bytes, u64 *actual_bytes) |
1894 | { | 1894 | { |
1895 | int ret; | 1895 | int ret; |
1896 | u64 discarded_bytes = 0; | 1896 | u64 discarded_bytes = 0; |
@@ -9698,12 +9698,6 @@ int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end) | |||
9698 | return unpin_extent_range(root, start, end, false); | 9698 | return unpin_extent_range(root, start, end, false); |
9699 | } | 9699 | } |
9700 | 9700 | ||
9701 | int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr, | ||
9702 | u64 num_bytes, u64 *actual_bytes) | ||
9703 | { | ||
9704 | return btrfs_discard_extent(root, bytenr, num_bytes, actual_bytes); | ||
9705 | } | ||
9706 | |||
9707 | int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range) | 9701 | int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range) |
9708 | { | 9702 | { |
9709 | struct btrfs_fs_info *fs_info = root->fs_info; | 9703 | struct btrfs_fs_info *fs_info = root->fs_info; |
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index edf32c5bbef1..d6c03f7f136b 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -2966,8 +2966,8 @@ static int do_trimming(struct btrfs_block_group_cache *block_group, | |||
2966 | spin_unlock(&block_group->lock); | 2966 | spin_unlock(&block_group->lock); |
2967 | spin_unlock(&space_info->lock); | 2967 | spin_unlock(&space_info->lock); |
2968 | 2968 | ||
2969 | ret = btrfs_error_discard_extent(fs_info->extent_root, | 2969 | ret = btrfs_discard_extent(fs_info->extent_root, |
2970 | start, bytes, &trimmed); | 2970 | start, bytes, &trimmed); |
2971 | if (!ret) | 2971 | if (!ret) |
2972 | *total_trimmed += trimmed; | 2972 | *total_trimmed += trimmed; |
2973 | 2973 | ||