mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
btrfs: copy all pages at once at the end of btrfs_clone_extent_buffer()
btrfs_clone_extent_buffer() calls copy_page() at each iteration but we can copy all pages at the end in one go if there were no errors. This would make later conversion to folios easier. Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
54948681c2
commit
682a0bc557
@ -3239,8 +3239,8 @@ struct extent_buffer *btrfs_clone_extent_buffer(const struct extent_buffer *src)
|
||||
return NULL;
|
||||
}
|
||||
WARN_ON(PageDirty(p));
|
||||
copy_page(page_address(p), page_address(src->pages[i]));
|
||||
}
|
||||
copy_extent_buffer_full(new, src);
|
||||
set_extent_buffer_uptodate(new);
|
||||
|
||||
return new;
|
||||
|
Loading…
Reference in New Issue
Block a user