aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-04-09 16:32:42 -0400
committerSteve French <sfrench@us.ibm.com>2008-04-09 16:32:42 -0400
commit35028d71116926008f5c19b8fcb00aacaabf5eab (patch)
tree34cf61c650d45ffa5de0cfd0ccc0e63df19dd050 /fs/cifs
parent932e2d23c8529c39fe74549dcbe4b2c8b2d66ba4 (diff)
[CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail on reconnect
Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifssmb.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 30bbe448e260..4728fa982a4e 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -165,17 +165,19 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
165 rc = CIFSTCon(0, tcon->ses, tcon->treeName, 165 rc = CIFSTCon(0, tcon->ses, tcon->treeName,
166 tcon, nls_codepage); 166 tcon, nls_codepage);
167 up(&tcon->ses->sesSem); 167 up(&tcon->ses->sesSem);
168 /* tell server which Unix caps we support */
169 if (tcon->ses->capabilities & CAP_UNIX)
170 reset_cifs_unix_caps(0 /* no xid */,
171 tcon,
172 NULL /* we do not know sb */,
173 NULL /* no vol info */);
174 /* BB FIXME add code to check if wsize needs 168 /* BB FIXME add code to check if wsize needs
175 update due to negotiated smb buffer size 169 update due to negotiated smb buffer size
176 shrinking */ 170 shrinking */
177 if (rc == 0) 171 if (rc == 0) {
178 atomic_inc(&tconInfoReconnectCount); 172 atomic_inc(&tconInfoReconnectCount);
173 /* tell server Unix caps we support */
174 if (tcon->ses->capabilities & CAP_UNIX)
175 reset_cifs_unix_caps(
176 0 /* no xid */,
177 tcon,
178 NULL /* we do not know sb */,
179 NULL /* no vol info */);
180 }
179 181
180 cFYI(1, ("reconnect tcon rc = %d", rc)); 182 cFYI(1, ("reconnect tcon rc = %d", rc));
181 /* Removed call to reopen open files here. 183 /* Removed call to reopen open files here.
@@ -310,17 +312,19 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
310 rc = CIFSTCon(0, tcon->ses, tcon->treeName, 312 rc = CIFSTCon(0, tcon->ses, tcon->treeName,
311 tcon, nls_codepage); 313 tcon, nls_codepage);
312 up(&tcon->ses->sesSem); 314 up(&tcon->ses->sesSem);
313 /* tell server which Unix caps we support */
314 if (tcon->ses->capabilities & CAP_UNIX)
315 reset_cifs_unix_caps(0 /* no xid */,
316 tcon,
317 NULL /* do not know sb */,
318 NULL /* no vol info */);
319 /* BB FIXME add code to check if wsize needs 315 /* BB FIXME add code to check if wsize needs
320 update due to negotiated smb buffer size 316 update due to negotiated smb buffer size
321 shrinking */ 317 shrinking */
322 if (rc == 0) 318 if (rc == 0) {
323 atomic_inc(&tconInfoReconnectCount); 319 atomic_inc(&tconInfoReconnectCount);
320 /* tell server Unix caps we support */
321 if (tcon->ses->capabilities & CAP_UNIX)
322 reset_cifs_unix_caps(
323 0 /* no xid */,
324 tcon,
325 NULL /* do not know sb */,
326 NULL /* no vol info */);
327 }
324 328
325 cFYI(1, ("reconnect tcon rc = %d", rc)); 329 cFYI(1, ("reconnect tcon rc = %d", rc));
326 /* Removed call to reopen open files here. 330 /* Removed call to reopen open files here.