OSDN Git Service

btrfs: subpage: make end_compressed_bio_writeback() compatible
authorQu Wenruo <wqu@suse.com>
Mon, 27 Sep 2021 07:22:01 +0000 (15:22 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:08:04 +0000 (19:08 +0200)
commit741ec653ab58f5f263f2b6df38157997661c7a50
treeeda35cc110f5c62b95ee1af5987e9fc117cb8194
parentbbbff01a47bfe1b7733c5ccac6a78ff6d7a8954f
btrfs: subpage: make end_compressed_bio_writeback() compatible

In end_compressed_writeback() we just clear the full page writeback.
For subpage case, if there are two delalloc ranges in the same page, the
2nd range will trigger a BUG_ON() as the page writeback is already
cleared by previous range.

Fix it by using btrfs_page_clamp_clear_writeback() helper.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c