aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-02-04 13:47:26 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-04-01 23:19:22 -0400
commit74027f4a181754e917853bd1d2e21449f008ab39 (patch)
tree74f1dc9ab796632ef072116a1ea6c1d9c2be4ffb /fs
parent6e58e79db8a16222b31fc8da1ca2ac2dccfc4237 (diff)
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')
-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:
2918 rc = 0; 2918 rc = 0;
2919 2919
2920 /* the loop below should proceed in the order of increasing offsets */ 2920 /* the loop below should proceed in the order of increasing offsets */
2921restart_loop:
2922 list_for_each_entry_safe(rdata, tmp, &rdata_list, list) { 2921 list_for_each_entry_safe(rdata, tmp, &rdata_list, list) {
2922 again:
2923 if (!rc) { 2923 if (!rc) {
2924 ssize_t copied; 2924 ssize_t copied;
2925 2925
@@ -2927,20 +2927,20 @@ restart_loop:
2927 rc = wait_for_completion_killable(&rdata->done); 2927 rc = wait_for_completion_killable(&rdata->done);
2928 if (rc) 2928 if (rc)
2929 rc = -EINTR; 2929 rc = -EINTR;
2930 else if (rdata->result) 2930 else if (rdata->result) {
2931 rc = rdata->result; 2931 rc = rdata->result;
2932 else { 2932 /* resend call if it's a retryable error */
2933 if (rc == -EAGAIN) {
2934 rc = cifs_retry_async_readv(rdata);
2935 goto again;
2936 }
2937 } else {
2933 rc = cifs_readdata_to_iov(rdata, iov, 2938 rc = cifs_readdata_to_iov(rdata, iov,
2934 nr_segs, *poffset, 2939 nr_segs, *poffset,
2935 &copied); 2940 &copied);
2936 total_read += copied; 2941 total_read += copied;
2937 } 2942 }
2938 2943
2939 /* resend call if it's a retryable error */
2940 if (rc == -EAGAIN) {
2941 rc = cifs_retry_async_readv(rdata);
2942 goto restart_loop;
2943 }
2944 } 2944 }
2945 list_del_init(&rdata->list); 2945 list_del_init(&rdata->list);
2946 kref_put(&rdata->refcount, cifs_uncached_readdata_release); 2946 kref_put(&rdata->refcount, cifs_uncached_readdata_release);