]> git.baikalelectronics.ru Git - kernel.git/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)
commite19da83877a893b477a722e9ece7afc53a965a75
treea7e1776997955259906c4dbd94eb19a597dfa21d
parent466036f26fc5bc4d4d834d3a75ef31e8ccdc3c85
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