summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorNikolay Borisov2018-11-01 13:09:53 +0100
committerDavid Sterba2018-12-17 14:51:29 +0100
commitabbb55f4cd56dffb20ba7dd8dfc53154c79934f1 (patch)
treec0ce69c4035be9e1468856bf7ef5de7314b3cfc7 /fs/btrfs/extent_io.c
parentbtrfs: Remove extent_io_ops::merge_extent_hook callback (diff)
downloadkernel-qcow2-linux-abbb55f4cd56dffb20ba7dd8dfc53154c79934f1.tar.gz
kernel-qcow2-linux-abbb55f4cd56dffb20ba7dd8dfc53154c79934f1.tar.xz
kernel-qcow2-linux-abbb55f4cd56dffb20ba7dd8dfc53154c79934f1.zip
btrfs: Remove extent_io_ops::split_extent_hook callback
This is the counterpart to merge_extent_hook, similarly, it's used only for data/freespace inodes so let's remove it, rename it and call it directly where necessary. No functional changes. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 861a087025a9..160efb201ef3 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -445,13 +445,6 @@ static int insert_state(struct extent_io_tree *tree,
return 0;
}
-static void split_cb(struct extent_io_tree *tree, struct extent_state *orig,
- u64 split)
-{
- if (tree->ops && tree->ops->split_extent_hook)
- tree->ops->split_extent_hook(tree->private_data, orig, split);
-}
-
/*
* split a given extent state struct in two, inserting the preallocated
* struct 'prealloc' as the newly created second half. 'split' indicates an
@@ -471,7 +464,8 @@ static int split_state(struct extent_io_tree *tree, struct extent_state *orig,
{
struct rb_node *node;
- split_cb(tree, orig, split);
+ if (tree->private_data && is_data_inode(tree->private_data))
+ btrfs_split_delalloc_extent(tree->private_data, orig, split);
prealloc->start = orig->start;
prealloc->end = split - 1;