* [PATCH] netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
@ 2021-08-13 14:47 David Howells
0 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2021-08-13 14:47 UTC (permalink / raw)
To: torvalds
Cc: Jeff Layton, linux-cachefs, linux-afs, ceph-devel, linux-cifs,
linux-nfs, v9fs-developer, linux-fsdevel, linux-mm, dhowells,
linux-kernel
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: 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-afs@lists.infradead.org
cc: ceph-devel@vger.kernel.org
cc: linux-cifs@vger.kernel.org
cc: linux-nfs@vger.kernel.org
cc: v9fs-developer@lists.sourceforge.net
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Link: https://lore.kernel.org/r/162729351325.813557.9242842205308443901.stgit@warthog.procyon.org.uk/
---
fs/netfs/read_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
index 2ad91f9e2a45..9320a42dfaf9 100644
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -150,7 +150,7 @@ static void netfs_clear_unread(struct netfs_read_subrequest *subreq)
{
struct iov_iter iter;
- iov_iter_xarray(&iter, WRITE, &subreq->rreq->mapping->i_pages,
+ iov_iter_xarray(&iter, READ, &subreq->rreq->mapping->i_pages,
subreq->start + subreq->transferred,
subreq->len - subreq->transferred);
iov_iter_zero(iov_iter_count(&iter), &iter);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
@ 2021-09-23 9:52 David Howells
0 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2021-09-23 9:52 UTC (permalink / raw)
To: torvalds
Cc: Jeff Layton, linux-cachefs, linux-afs, ceph-devel, linux-cifs,
linux-nfs, v9fs-developer, linux-fsdevel, linux-mm, dhowells,
linux-kernel
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: 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-afs@lists.infradead.org
cc: ceph-devel@vger.kernel.org
cc: linux-cifs@vger.kernel.org
cc: linux-nfs@vger.kernel.org
cc: v9fs-developer@lists.sourceforge.net
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Link: https://lore.kernel.org/r/162729351325.813557.9242842205308443901.stgit@warthog.procyon.org.uk/
---
fs/netfs/read_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
index 2ad91f9e2a45..9320a42dfaf9 100644
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -150,7 +150,7 @@ static void netfs_clear_unread(struct netfs_read_subrequest *subreq)
{
struct iov_iter iter;
- iov_iter_xarray(&iter, WRITE, &subreq->rreq->mapping->i_pages,
+ iov_iter_xarray(&iter, READ, &subreq->rreq->mapping->i_pages,
subreq->start + subreq->transferred,
subreq->len - subreq->transferred);
iov_iter_zero(iov_iter_count(&iter), &iter);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
@ 2021-07-26 9:58 David Howells
2021-08-13 12:53 ` Jeff Layton
0 siblings, 1 reply; 5+ messages in thread
From: David Howells @ 2021-07-26 9:58 UTC (permalink / raw)
To: linux-cachefs
Cc: Jeff Layton, linux-afs, ceph-devel, linux-cifs, linux-nfs,
v9fs-developer, linux-fsdevel, linux-mm, dhowells, linux-kernel
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: 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-afs@lists.infradead.org
cc: ceph-devel@vger.kernel.org
cc: linux-cifs@vger.kernel.org
cc: linux-nfs@vger.kernel.org
cc: v9fs-developer@lists.sourceforge.net
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
---
fs/netfs/read_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
index 0b6cd3b8734c..994ec22d4040 100644
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -150,7 +150,7 @@ static void netfs_clear_unread(struct netfs_read_subrequest *subreq)
{
struct iov_iter iter;
- iov_iter_xarray(&iter, WRITE, &subreq->rreq->mapping->i_pages,
+ iov_iter_xarray(&iter, READ, &subreq->rreq->mapping->i_pages,
subreq->start + subreq->transferred,
subreq->len - subreq->transferred);
iov_iter_zero(iov_iter_count(&iter), &iter);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
2021-07-26 9:58 David Howells
@ 2021-08-13 12:53 ` Jeff Layton
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2021-08-13 12:53 UTC (permalink / raw)
To: David Howells, linux-cachefs
Cc: linux-afs, ceph-devel, linux-cifs, linux-nfs, v9fs-developer,
linux-fsdevel, linux-mm, linux-kernel
On Mon, 2021-07-26 at 10:58 +0100, David Howells wrote:
> 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: 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers")
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Jeff Layton <jlayton@kernel.org>
> cc: linux-cachefs@redhat.com
> cc: linux-afs@lists.infradead.org
> cc: ceph-devel@vger.kernel.org
> cc: linux-cifs@vger.kernel.org
> cc: linux-nfs@vger.kernel.org
> cc: v9fs-developer@lists.sourceforge.net
> cc: linux-fsdevel@vger.kernel.org
> cc: linux-mm@kvack.org
> ---
>
> fs/netfs/read_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
> index 0b6cd3b8734c..994ec22d4040 100644
> --- a/fs/netfs/read_helper.c
> +++ b/fs/netfs/read_helper.c
> @@ -150,7 +150,7 @@ static void netfs_clear_unread(struct netfs_read_subrequest *subreq)
> {
> struct iov_iter iter;
>
> - iov_iter_xarray(&iter, WRITE, &subreq->rreq->mapping->i_pages,
> + iov_iter_xarray(&iter, READ, &subreq->rreq->mapping->i_pages,
> subreq->start + subreq->transferred,
> subreq->len - subreq->transferred);
> iov_iter_zero(iov_iter_count(&iter), &iter);
>
>
That's better!
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
@ 2021-08-13 12:53 ` Jeff Layton
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2021-08-13 12:53 UTC (permalink / raw)
To: David Howells, linux-cachefs
Cc: linux-afs, ceph-devel, linux-cifs, linux-nfs, v9fs-developer,
linux-fsdevel, linux-mm, linux-kernel
On Mon, 2021-07-26 at 10:58 +0100, David Howells wrote:
> 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: 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers")
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Jeff Layton <jlayton@kernel.org>
> cc: linux-cachefs@redhat.com
> cc: linux-afs@lists.infradead.org
> cc: ceph-devel@vger.kernel.org
> cc: linux-cifs@vger.kernel.org
> cc: linux-nfs@vger.kernel.org
> cc: v9fs-developer@lists.sourceforge.net
> cc: linux-fsdevel@vger.kernel.org
> cc: linux-mm@kvack.org
> ---
>
> fs/netfs/read_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
> index 0b6cd3b8734c..994ec22d4040 100644
> --- a/fs/netfs/read_helper.c
> +++ b/fs/netfs/read_helper.c
> @@ -150,7 +150,7 @@ static void netfs_clear_unread(struct netfs_read_subrequest *subreq)
> {
> struct iov_iter iter;
>
> - iov_iter_xarray(&iter, WRITE, &subreq->rreq->mapping->i_pages,
> + iov_iter_xarray(&iter, READ, &subreq->rreq->mapping->i_pages,
> subreq->start + subreq->transferred,
> subreq->len - subreq->transferred);
> iov_iter_zero(iov_iter_count(&iter), &iter);
>
>
That's better!
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-23 9:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 14:47 [PATCH] netfs: Fix READ/WRITE confusion when calling iov_iter_xarray() David Howells
-- strict thread matches above, loose matches on Subject: below --
2021-09-23 9:52 David Howells
2021-07-26 9:58 David Howells
2021-08-13 12:53 ` Jeff Layton
2021-08-13 12:53 ` Jeff Layton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.