summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-31 10:54:10 +0300
committerDavid Sterba <dsterba@suse.com>2023-06-19 14:59:37 +0300
commit0d394cca8435045f909bd2bb099575b11452e19a (patch)
tree6140aeebe8fd1d58e9ea830ef0cc90765ac8d1d9 /fs/btrfs
parentb41b6f6937dc89e072b334e8d814487cb4692770 (diff)
downloadlinux-0d394cca8435045f909bd2bb099575b11452e19a.tar.xz
btrfs: use btrfs_finish_ordered_extent to complete buffered writes
Use the btrfs_finish_ordered_extent helper to complete compressed writes using the bbio->ordered pointer instead of requiring an rbtree lookup in the otherwise equivalent btrfs_mark_ordered_io_finished called from btrfs_writepage_endio_finish_ordered. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent_io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 827e8dfebf0f..a91d5ad27984 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -557,8 +557,7 @@ static void end_bio_extent_writepage(struct btrfs_bio *bbio)
"incomplete page write with offset %u and length %u",
bvec->bv_offset, bvec->bv_len);
- btrfs_writepage_endio_finish_ordered(BTRFS_I(inode), page, start,
- start + len - 1, !error);
+ btrfs_finish_ordered_extent(bbio->ordered, page, start, len, !error);
if (error) {
btrfs_page_clear_uptodate(fs_info, page, start, len);
mapping_set_error(page->mapping, error);