summaryrefslogtreecommitdiff
path: root/include/linux/processor.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2025-10-21 06:51:48 +0300
committerDavid Sterba <dsterba@suse.com>2025-11-25 00:03:38 +0300
commit988f693a46d83dc832005a1403ae0471eb1f8964 (patch)
treea2e72d5aafa7419debc7b2beacb4de0c01f853b1 /include/linux/processor.h
parentca428e9b49c77b0bfc6ebbc8536ed854463b26e2 (diff)
downloadlinux-988f693a46d83dc832005a1403ae0471eb1f8964.tar.xz
btrfs: subpage: simplify the PAGECACHE_TAG_TOWRITE handling
In function btrfs_subpage_set_writeback() we need to keep the PAGECACHE_TAG_TOWRITE tag if the folio is still dirty. This is a needed quirk for support async extents, as a subpage range can almost suddenly go writeback, without touching other subpage ranges in the same folio. However we can simplify the handling by replace the open-coded tag clearing by passing the @keep_write flag depending on if the folio is dirty. Since we're holding the subpage lock already, no one is able to change the dirty/writeback flag, thus it's safe to check the folio dirty before calling __folio_start_writeback(). Reviewed-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/processor.h')
0 files changed, 0 insertions, 0 deletions