fs/netfs/read_collect: remove duplicate line
PATCH 1/1 fs/netfs/read_collect: remove duplicate line
The ret variable has already been assigned before the switch block.
--- fs/netfs/read_collect.c | 1 - 1 file changed, 1 deletion(-)
fs/netfs/read_collect.c +0 -1
@@ -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) {
Signature · 1 line
2.47.2
fs/netfs/read_collect.c ssize_t netfs_wait_for_read(struct netfs_io_request *rreq) · line 658
Quoted 8 lines · Max Kellermann
fs/netfs/read_collect.c +0
-1@@ -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.
A message that is not in the archive (sent off-list or not yet received): notmuch-sha1-fe1ebcd5fc23eab1dc1cf15f4369d4b0ea567ded
Paulo Alcantara
Reviewed-byQuoted 13 lines · Paulo Alcantara
fs/netfs/read_collect.c ssize_t netfs_wait_for_read(struct netfs_io_request *rreq) · line 658
Quoted 8 lines · Max Kellermann
fs/netfs/read_collect.c +0
-1@@ -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.
Err, sorry. I just saw the assignment right after if (ret == 0) check.
Looks good,
David Howells
maintainerQuoted 5 lines · Max Kellermann
The
retvariable has already been assigned before theswitchblock.Signed-off-by Max Kellermann <[email protected]>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