Skip to content

Commit a060c94

Browse files
committed
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
2 parents b06a175 + 631f871 commit a060c94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/iomap/buffered-io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i)
765765
* same page as we're writing to, without it being marked
766766
* up-to-date.
767767
*/
768-
if (unlikely(fault_in_iov_iter_readable(i, bytes))) {
768+
if (unlikely(fault_in_iov_iter_readable(i, bytes) == bytes)) {
769769
status = -EFAULT;
770770
break;
771771
}

mm/filemap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3779,7 +3779,7 @@ ssize_t generic_perform_write(struct file *file,
37793779
* same page as we're writing to, without it being marked
37803780
* up-to-date.
37813781
*/
3782-
if (unlikely(fault_in_iov_iter_readable(i, bytes))) {
3782+
if (unlikely(fault_in_iov_iter_readable(i, bytes) == bytes)) {
37833783
status = -EFAULT;
37843784
break;
37853785
}

0 commit comments

Comments
 (0)