summaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2023-01-27 00:01:00 +0300
committerDavid Sterba <dsterba@suse.com>2023-02-15 21:38:54 +0300
commit79b02ec1d8ce1fafc8c39f888dbba6a3aa9a35cc (patch)
treedd9ca3258bbcebfa51c1ad7104e4a331ddaa3084 /fs/btrfs/tree-log.c
parent98c8d683c291285be35c50579ac984e71d17ddc1 (diff)
downloadlinux-79b02ec1d8ce1fafc8c39f888dbba6a3aa9a35cc.tar.xz
btrfs: replace btrfs_wait_tree_block_writeback by wait_on_extent_buffer_writeback
This is used in the tree-log code and is a holdover from previous iterations of extent buffer writeback. We can simply use wait_on_extent_buffer_writeback here, and remove btrfs_wait_tree_block_writeback completely as it's equivalent (waiting on page write writeback). 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/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 0297379f1a70..200cea6e49e5 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -279,12 +279,6 @@ void btrfs_end_log_trans(struct btrfs_root *root)
}
}
-static void btrfs_wait_tree_block_writeback(struct extent_buffer *buf)
-{
- filemap_fdatawait_range(buf->pages[0]->mapping,
- buf->start, buf->start + buf->len - 1);
-}
-
/*
* the walk control struct is used to pass state down the chain when
* processing the log tree. The stage field tells us which part
@@ -2625,7 +2619,7 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
btrfs_tree_lock(next);
btrfs_clear_buffer_dirty(trans, next);
- btrfs_wait_tree_block_writeback(next);
+ wait_on_extent_buffer_writeback(next);
btrfs_tree_unlock(next);
if (trans) {
@@ -2694,7 +2688,7 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
btrfs_tree_lock(next);
btrfs_clear_buffer_dirty(trans, next);
- btrfs_wait_tree_block_writeback(next);
+ wait_on_extent_buffer_writeback(next);
btrfs_tree_unlock(next);
if (trans) {
@@ -2775,7 +2769,7 @@ static int walk_log_tree(struct btrfs_trans_handle *trans,
btrfs_tree_lock(next);
btrfs_clear_buffer_dirty(trans, next);
- btrfs_wait_tree_block_writeback(next);
+ wait_on_extent_buffer_writeback(next);
btrfs_tree_unlock(next);
if (trans) {