]> git.itanic.dy.fi Git - linux-stable/commit
iomap: Fix iomap_dio_rw return value for user copies
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 15 Jul 2021 20:31:02 +0000 (22:31 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Sun, 24 Oct 2021 13:26:05 +0000 (15:26 +0200)
commit42c498c18a94eed79896c50871889af52fa0822e
treea7e1776997955259906c4dbd94eb19a597dfa21d
parent00bfe02f479688a67a29019d1228f1470e26f014
iomap: Fix iomap_dio_rw return value for user copies

When a user copy fails in one of the helpers of iomap_dio_rw, fail with
-EFAULT instead of returning 0.  This matches what iomap_dio_bio_actor
returns when it gets an -EFAULT from bio_iov_iter_get_pages.  With these
changes, iomap_dio_actor now consistently fails with -EFAULT when a user
page cannot be faulted in.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/iomap/direct-io.c