diff options
author | Christoph Hellwig <hch@lst.de> | 2023-05-31 09:54:10 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-06-19 13:59:37 +0200 |
commit | 0d394cca8435045f909bd2bb099575b11452e19a (patch) | |
tree | 6140aeebe8fd1d58e9ea830ef0cc90765ac8d1d9 | |
parent | b41b6f6937dc89e072b334e8d814487cb4692770 (diff) | |
download | lwn-0d394cca8435045f909bd2bb099575b11452e19a.tar.gz lwn-0d394cca8435045f909bd2bb099575b11452e19a.zip |
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>
-rw-r--r-- | fs/btrfs/extent_io.c | 3 |
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); |