fs/netfs/read_collect.c | 1 - 1 file changed, 1 deletion(-)
The `ret` variable has already been assigned before the `switch`
block.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item")
---
fs/netfs/read_collect.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/netfs/read_collect.c b/fs/netfs/read_collect.c
index 23c75755ad4e..422bfac47817 100644
--- a/fs/netfs/read_collect.c
+++ b/fs/netfs/read_collect.c
@@ -653,7 +653,6 @@ ssize_t netfs_wait_for_read(struct netfs_io_request *rreq)
switch (rreq->origin) {
case NETFS_DIO_READ:
case NETFS_READ_SINGLE:
- ret = rreq->transferred;
break;
default:
if (rreq->submitted < rreq->len) {
--
2.47.2
Max Kellermann <max.kellermann@ionos.com> wrote:
> The `ret` variable has already been assigned before the `switch`
> block.
>
> Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
> Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item")
Please hold off on this one. I want to submit the two patches at the bottom
of here instead:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes
netfs: Fix the request's work item to not require a ref
netfs: Fix wait/wake to be consistent about the waitqueue used
and this code gets moved and commonalised with the wait-for-write functions.
The reason I haven't posted them yet is that there may be an issue with cifs -
and only in Steve's testfarm - though I'm not sure whether it's actually
directly related to the changes here or whether it was masked just by it.
Thanks,
David
Max Kellermann <max.kellermann@ionos.com> writes:
> @@ -653,7 +653,6 @@ ssize_t netfs_wait_for_read(struct netfs_io_request *rreq)
> switch (rreq->origin) {
> case NETFS_DIO_READ:
> case NETFS_READ_SINGLE:
> - ret = rreq->transferred;
> break;
> default:
> if (rreq->submitted < rreq->len) {
This is wrong. @ret is expected to have the amount of bytes
successfully read if no error.
© 2016 - 2026 Red Hat, Inc.