aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r--fs/cifs/transport.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 893a6fef9853..d9b11690746d 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -157,14 +157,14 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
157 /* smaller timeout here than send2 since smaller size */ 157 /* smaller timeout here than send2 since smaller size */
158 /* Although it may not be required, this also is smaller 158 /* Although it may not be required, this also is smaller
159 oplock break time */ 159 oplock break time */
160 if(i > 30) { 160 if(i > 12) {
161 cERROR(1, 161 cERROR(1,
162 ("sends on sock %p stuck for 15 seconds", 162 ("sends on sock %p stuck for 7 seconds",
163 ssocket)); 163 ssocket));
164 rc = -EAGAIN; 164 rc = -EAGAIN;
165 break; 165 break;
166 } 166 }
167 msleep(500); 167 msleep(1 << i);
168 continue; 168 continue;
169 } 169 }
170 if (rc < 0) 170 if (rc < 0)
@@ -224,14 +224,14 @@ smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec,
224 n_vec - first_vec, total_len); 224 n_vec - first_vec, total_len);
225 if ((rc == -ENOSPC) || (rc == -EAGAIN)) { 225 if ((rc == -ENOSPC) || (rc == -EAGAIN)) {
226 i++; 226 i++;
227 if(i > 40) { 227 if(i >= 14) {
228 cERROR(1, 228 cERROR(1,
229 ("sends on sock %p stuck for 20 seconds", 229 ("sends on sock %p stuck for 15 seconds",
230 ssocket)); 230 ssocket));
231 rc = -EAGAIN; 231 rc = -EAGAIN;
232 break; 232 break;
233 } 233 }
234 msleep(500); 234 msleep(1 << i);
235 continue; 235 continue;
236 } 236 }
237 if (rc < 0) 237 if (rc < 0)
@@ -249,6 +249,7 @@ smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec,
249 continue; 249 continue;
250 } 250 }
251 total_len -= rc; 251 total_len -= rc;
252 /* the line below resets i */
252 for (i = first_vec; i < n_vec; i++) { 253 for (i = first_vec; i < n_vec; i++) {
253 if (iov[i].iov_len) { 254 if (iov[i].iov_len) {
254 if (rc > iov[i].iov_len) { 255 if (rc > iov[i].iov_len) {