On 7/7/22 10:08 PM, Jeff Layton wrote:
Currently, when we call ceph_netfs_issue_read for an encrypted inode,
we'll call iov_iter_get_pages_alloc and assign its result to "err".
Later we'll end up inappropriately calling netfs_subreq_terminated with
that value after submitting the request. Ensure we reset "err = 0;"
after calling iov_iter_get_pages_alloc.
Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
fs/ceph/addr.c | 1 +
1 file changed, 1 insertion(+)
Probably this should get squashed into the patch that adds fscrypt
support to buffered reads.
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index c713b5491012..64facef79883 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -376,6 +376,7 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
/* should always give us a page-aligned read */
WARN_ON_ONCE(page_off);
len = err;
+ err = 0;
osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, false, false);
} else {
Looks good. Thanks Jeff!
Show we fold it into the previous patch ?
-- Xiubo