Skip to content

Commit 330de47

Browse files
committed
netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
Fix netfs_clear_unread() to pass READ to iov_iter_xarray() instead of WRITE (the flag is about the operation accessing the buffer, not what sort of access it is doing to the buffer). Fixes: 3d3c950 ("netfs: Provide readahead and readpage netfs helpers") Signed-off-by: David Howells <[email protected]> Reviewed-by: Jeff Layton <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Link: https://lore.kernel.org/r/162729351325.813557.9242842205308443901.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/162886603464.3940407.3790841170414793899.stgit@warthog.procyon.org.uk Link: https://lore.kernel.org/r/163239074602.1243337.14154704004485867017.stgit@warthog.procyon.org.uk
1 parent a0e25f0 commit 330de47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/netfs/read_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static void netfs_clear_unread(struct netfs_read_subrequest *subreq)
150150
{
151151
struct iov_iter iter;
152152

153-
iov_iter_xarray(&iter, WRITE, &subreq->rreq->mapping->i_pages,
153+
iov_iter_xarray(&iter, READ, &subreq->rreq->mapping->i_pages,
154154
subreq->start + subreq->transferred,
155155
subreq->len - subreq->transferred);
156156
iov_iter_zero(iov_iter_count(&iter), &iter);

0 commit comments

Comments
 (0)