diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-11-01 14:09:51 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:28 +0100 |
commit | a36bb5f9a90c9bab05b7084d21718450e8067fb0 (patch) | |
tree | d3b0308eeb9910ba0c251a5e7e1cd3a96fe6e3c5 /fs/btrfs/extent_io.c | |
parent | e06a1fc99cc7eca09118cc02c4d7540fa69e9d09 (diff) | |
download | linux-a36bb5f9a90c9bab05b7084d21718450e8067fb0.tar.bz2 |
btrfs: Remove extent_io_ops::clear_bit_hook callback
This is the counterpart to ex-set_bit_hook (now btrfs_set_delalloc_extent),
similar to what was done before remove clear_bit_hook and rename the
function. 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.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 1678adae7963..b9aadbf1a9f9 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -404,13 +404,6 @@ static void merge_state(struct extent_io_tree *tree, } } -static void clear_state_cb(struct extent_io_tree *tree, - struct extent_state *state, unsigned *bits) -{ - if (tree->ops && tree->ops->clear_bit_hook) - tree->ops->clear_bit_hook(tree->private_data, state, bits); -} - static void set_state_bits(struct extent_io_tree *tree, struct extent_state *state, unsigned *bits, struct extent_changeset *changeset); @@ -525,7 +518,10 @@ static struct extent_state *clear_state_bit(struct extent_io_tree *tree, WARN_ON(range > tree->dirty_bytes); tree->dirty_bytes -= range; } - clear_state_cb(tree, state, bits); + + if (tree->private_data && is_data_inode(tree->private_data)) + btrfs_clear_delalloc_extent(tree->private_data, state, bits); + ret = add_extent_changeset(state, bits_to_clear, changeset, 0); BUG_ON(ret < 0); state->state &= ~bits_to_clear; |