btrfs: make extent_write_locked_range() handle subpage writeback correctly
authorQu Wenruo <wqu@suse.com>
Tue, 5 Mar 2024 06:57:58 +0000 (17:27 +1030)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:22 +0000 (15:33 +0200)
commita185373e53c6d22134c89be8508cfb5a491103c8
treea5404a79c97bbaf65fa3293dc11d94d1803eebf4
parent97713b1a2ced1e4a2a6c40045903797ebd44d7e0
btrfs: make extent_write_locked_range() handle subpage writeback correctly

When extent_write_locked_range() generated an inline extent, it would
set and finish the writeback for the whole page.

Although currently it's safe since subpage disables inline creation,
for the sake of consistency, let it go with subpage helpers to set and
clear the writeback flags.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c