summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorAl Viro2014-02-04 19:47:26 +0100
committerAl Viro2014-04-02 05:19:22 +0200
commit74027f4a181754e917853bd1d2e21449f008ab39 (patch)
tree74f1dc9ab796632ef072116a1ea6c1d9c2be4ffb /fs/cifs/file.c
parentintroduce copy_page_to_iter, kill loop over iovec in generic_file_aio_read() (diff)
downloadkernel-qcow2-linux-74027f4a181754e917853bd1d2e21449f008ab39.tar.gz
kernel-qcow2-linux-74027f4a181754e917853bd1d2e21449f008ab39.tar.xz
kernel-qcow2-linux-74027f4a181754e917853bd1d2e21449f008ab39.zip
cifs_iovec_read(): resubmit shouldn't restart the loop
... by that point the request we'd just resent is in the head of the list anyway. Just return to the beginning of the loop body... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 834fce759d80..df414db74ab9 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2918,8 +2918,8 @@ error:
rc = 0;
/* the loop below should proceed in the order of increasing offsets */
-restart_loop:
list_for_each_entry_safe(rdata, tmp, &rdata_list, list) {
+ again:
if (!rc) {
ssize_t copied;
@@ -2927,20 +2927,20 @@ restart_loop:
rc = wait_for_completion_killable(&rdata->done);
if (rc)
rc = -EINTR;
- else if (rdata->result)
+ else if (rdata->result) {
rc = rdata->result;
- else {
+ /* resend call if it's a retryable error */
+ if (rc == -EAGAIN) {
+ rc = cifs_retry_async_readv(rdata);
+ goto again;
+ }
+ } else {
rc = cifs_readdata_to_iov(rdata, iov,
nr_segs, *poffset,
&copied);
total_read += copied;
}
- /* resend call if it's a retryable error */
- if (rc == -EAGAIN) {
- rc = cifs_retry_async_readv(rdata);
- goto restart_loop;
- }
}
list_del_init(&rdata->list);
kref_put(&rdata->refcount, cifs_uncached_readdata_release);