summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2020-09-08 13:27:24 +0300
committerDavid Sterba <dsterba@suse.com>2020-10-07 13:13:17 +0300
commit0cbb5bdfea2675f4b9749f99120a79f9e0a28600 (patch)
treea2e9d5bd3a29abc90132ffbf44d7028aff943aec /fs/btrfs/file.c
parent306bfec02b1054d24bbbeec49ece6db396d451e0 (diff)
downloadlinux-0cbb5bdfea2675f4b9749f99120a79f9e0a28600.tar.xz
btrfs: rename btrfs_insert_clone_extent() to a more generic name
Now that we use the same mechanism to replace all the extents in a file range with either a hole, an existing extent (when cloning) or a new extent (when using fallocate), the name of btrfs_insert_clone_extent() no longer reflects its genericity. So rename it to btrfs_insert_replace_extent(), since what it does is to either insert an existing extent or a new extent into a file range. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 241b34e44a6c..32ceda264b7d 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2570,7 +2570,7 @@ static int btrfs_punch_hole_lock_range(struct inode *inode,
return 0;
}
-static int btrfs_insert_clone_extent(struct btrfs_trans_handle *trans,
+static int btrfs_insert_replace_extent(struct btrfs_trans_handle *trans,
struct inode *inode,
struct btrfs_path *path,
struct btrfs_replace_extent_info *extent_info,
@@ -2768,7 +2768,7 @@ int btrfs_replace_file_extents(struct inode *inode, struct btrfs_path *path,
if (extent_info && drop_end > extent_info->file_offset) {
u64 replace_len = drop_end - extent_info->file_offset;
- ret = btrfs_insert_clone_extent(trans, inode, path,
+ ret = btrfs_insert_replace_extent(trans, inode, path,
extent_info, replace_len);
if (ret) {
btrfs_abort_transaction(trans, ret);
@@ -2864,7 +2864,7 @@ int btrfs_replace_file_extents(struct inode *inode, struct btrfs_path *path,
}
if (extent_info) {
- ret = btrfs_insert_clone_extent(trans, inode, path, extent_info,
+ ret = btrfs_insert_replace_extent(trans, inode, path, extent_info,
extent_info->data_len);
if (ret) {
btrfs_abort_transaction(trans, ret);