]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: open-code btrfs_copy_from_user()
authorQu Wenruo <wqu@suse.com>
Thu, 7 Nov 2024 04:05:07 +0000 (14:35 +1030)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:15 +0000 (14:53 +0100)
commita883120b2d19630d3be56bc9649a71299ccbf95d
tree6e507ab65afaa41cb412bef01d94ffa1517a5c57
parentc0def46dec9c547679a25fe7552c4bcbec0b0dd2
btrfs: open-code btrfs_copy_from_user()

The function btrfs_copy_from_user() handles the folio dirtying for
buffered write. The original design is to allow that function to handle
multiple folios, but since commit c87c299776e4 ("btrfs: make buffered
write to copy one page a time") there is no need to support multiple
folios.

So here open-code btrfs_copy_from_user() to
copy_folio_from_iter_atomic() and flush_dcache_folio() calls.

The short-copy check and revert are still kept as-is.

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/file.c