]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: support subpage in btrfs_clone_extent_buffer
authorQu Wenruo <wqu@suse.com>
Tue, 26 Jan 2021 08:33:55 +0000 (16:33 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Feb 2021 21:59:02 +0000 (22:59 +0100)
commit04125b0a34fc0f0aba022357ec41d30f314e1af9
tree85832a6df418543ae078aa013ae1214bbcf055f3
parent1b8e5b2015c2e6ee5016f7d720141c9b9fc0ea95
btrfs: support subpage in btrfs_clone_extent_buffer

For btrfs_clone_extent_buffer(), it's mostly the same code of
__alloc_dummy_extent_buffer(), except it has extra page copy.

So to make it subpage compatible, we only need to:

- Call set_extent_buffer_uptodate() instead of SetPageUptodate()
  This will set correct uptodate bit for subpage and regular sector size
  cases.

Since we're calling set_extent_buffer_uptodate() which will also set
EXTENT_BUFFER_UPTODATE bit, we don't need to manually set that bit
either.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c