aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-04-30 10:26:41 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2021-06-10 11:45:14 -0400
commitf0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454 (patch)
tree05ad20f84ee097a534132fa9b2df9feae6d4a7d2 /fs/fuse/file.c
parent[xarray] iov_iter_npages(): just use DIV_ROUND_UP() (diff)
downloadlinux-dev-f0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454.tar.xz
linux-dev-f0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454.zip
iov_iter: replace iov_iter_copy_from_user_atomic() with iterator-advancing variant
Replacement is called copy_page_from_iter_atomic(); unlike the old primitive the callers do *not* need to do iov_iter_advance() after it. In case when they end up consuming less than they'd been given they need to do iov_iter_revert() on everything they had not consumed. That, however, needs to be done only on slow paths. All in-tree callers converted. And that kills the last user of iterate_all_kinds() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r--fs/fuse/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 44bd301fa4fb..4722fa31a185 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1171,10 +1171,9 @@ static ssize_t fuse_fill_write_pages(struct fuse_io_args *ia,
if (mapping_writably_mapped(mapping))
flush_dcache_page(page);
- tmp = iov_iter_copy_from_user_atomic(page, ii, offset, bytes);
+ tmp = copy_page_from_iter_atomic(page, offset, bytes, ii);
flush_dcache_page(page);
- iov_iter_advance(ii, tmp);
if (!tmp) {
unlock_page(page);
put_page(page);