summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-26 12:41:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-26 12:41:52 -0700
commita060c9409e25d573c23fccb8e02f098aa33f812e (patch)
tree71c107fa653cc1e02ac0e1b7971b2c14eb0d7465
parentb06a17583f6f810f620f95382b171cc5ce9848ee (diff)
parent631f871f071746789e9242e514ab0f49067fa97a (diff)
Merge tag 'write-page-prefaulting' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull iomap fixlet from Andreas Gruenbacher: "Fix buffered write page prefaulting. I forgot to send it the previous merge window. I've only improved the patch description since" * tag 'write-page-prefaulting' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: fs/iomap: Fix buffered write page prefaulting
-rw-r--r--fs/iomap/buffered-io.c2
-rw-r--r--mm/filemap.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index d5fbd860c8cd..49dccd9050f1 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -765,7 +765,7 @@ again:
* same page as we're writing to, without it being marked
* up-to-date.
*/
- if (unlikely(fault_in_iov_iter_readable(i, bytes))) {
+ if (unlikely(fault_in_iov_iter_readable(i, bytes) == bytes)) {
status = -EFAULT;
break;
}
diff --git a/mm/filemap.c b/mm/filemap.c
index 8426434042f4..647d72bf23b6 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3779,7 +3779,7 @@ again:
* same page as we're writing to, without it being marked
* up-to-date.
*/
- if (unlikely(fault_in_iov_iter_readable(i, bytes))) {
+ if (unlikely(fault_in_iov_iter_readable(i, bytes) == bytes)) {
status = -EFAULT;
break;
}