Skip to content

Commit

Permalink
btrfs: use btrfs_finish_ordered_extent to complete buffered writes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and David Sterba committed Jun 19, 2023
1 parent b41b6f6 commit 0d394cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0d394cc

Please sign in to comment.