diff options
author | Josef Bacik <josef@toxicpanda.com> | 2023-01-26 16:00:59 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-02-15 19:38:54 +0100 |
commit | 98c8d683c291285be35c50579ac984e71d17ddc1 (patch) | |
tree | 5d307d2e23f941d01b7151ca0a49cb6b2555bcba /fs/btrfs/disk-io.c | |
parent | 190a83391bc40862538572d1313c207c348d356d (diff) |
btrfs: combine btrfs_clear_buffer_dirty and clear_extent_buffer_dirty
btrfs_clear_buffer_dirty just does the test_clear_bit() and then calls
clear_extent_buffer_dirty and does the dirty metadata accounting.
Combine this into clear_extent_buffer_dirty and make the result
btrfs_clear_buffer_dirty.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 2ef9e0b3a425..b53f0e30ce2b 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -868,22 +868,6 @@ struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr, } -void btrfs_clear_buffer_dirty(struct btrfs_trans_handle *trans, - struct extent_buffer *buf) -{ - struct btrfs_fs_info *fs_info = buf->fs_info; - if (!trans || btrfs_header_generation(buf) == trans->transid) { - btrfs_assert_tree_write_locked(buf); - - if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &buf->bflags)) { - percpu_counter_add_batch(&fs_info->dirty_metadata_bytes, - -buf->len, - fs_info->dirty_metadata_batch); - clear_extent_buffer_dirty(buf); - } - } -} - static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info, u64 objectid) { |