Skip to content

Commit 0d394cc

Browse files
Christoph Hellwigkdave
authored andcommitted
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>
1 parent b41b6f6 commit 0d394cc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/btrfs/extent_io.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,7 @@ static void end_bio_extent_writepage(struct btrfs_bio *bbio)
557557
"incomplete page write with offset %u and length %u",
558558
bvec->bv_offset, bvec->bv_len);
559559

560-
btrfs_writepage_endio_finish_ordered(BTRFS_I(inode), page, start,
561-
start + len - 1, !error);
560+
btrfs_finish_ordered_extent(bbio->ordered, page, start, len, !error);
562561
if (error) {
563562
btrfs_page_clear_uptodate(fs_info, page, start, len);
564563
mapping_set_error(page->mapping, error);

0 commit comments

Comments
 (0)