mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[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>
This commit is contained in:
parent
932e2d23c8
commit
35028d7111
1 changed files with 18 additions and 14 deletions
|
@ -165,17 +165,19 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
||||||
rc = CIFSTCon(0, tcon->ses, tcon->treeName,
|
rc = CIFSTCon(0, tcon->ses, tcon->treeName,
|
||||||
tcon, nls_codepage);
|
tcon, nls_codepage);
|
||||||
up(&tcon->ses->sesSem);
|
up(&tcon->ses->sesSem);
|
||||||
/* tell server which Unix caps we support */
|
|
||||||
if (tcon->ses->capabilities & CAP_UNIX)
|
|
||||||
reset_cifs_unix_caps(0 /* no xid */,
|
|
||||||
tcon,
|
|
||||||
NULL /* we do not know sb */,
|
|
||||||
NULL /* no vol info */);
|
|
||||||
/* BB FIXME add code to check if wsize needs
|
/* BB FIXME add code to check if wsize needs
|
||||||
update due to negotiated smb buffer size
|
update due to negotiated smb buffer size
|
||||||
shrinking */
|
shrinking */
|
||||||
if (rc == 0)
|
if (rc == 0) {
|
||||||
atomic_inc(&tconInfoReconnectCount);
|
atomic_inc(&tconInfoReconnectCount);
|
||||||
|
/* tell server Unix caps we support */
|
||||||
|
if (tcon->ses->capabilities & CAP_UNIX)
|
||||||
|
reset_cifs_unix_caps(
|
||||||
|
0 /* no xid */,
|
||||||
|
tcon,
|
||||||
|
NULL /* we do not know sb */,
|
||||||
|
NULL /* no vol info */);
|
||||||
|
}
|
||||||
|
|
||||||
cFYI(1, ("reconnect tcon rc = %d", rc));
|
cFYI(1, ("reconnect tcon rc = %d", rc));
|
||||||
/* Removed call to reopen open files here.
|
/* Removed call to reopen open files here.
|
||||||
|
@ -310,17 +312,19 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
||||||
rc = CIFSTCon(0, tcon->ses, tcon->treeName,
|
rc = CIFSTCon(0, tcon->ses, tcon->treeName,
|
||||||
tcon, nls_codepage);
|
tcon, nls_codepage);
|
||||||
up(&tcon->ses->sesSem);
|
up(&tcon->ses->sesSem);
|
||||||
/* tell server which Unix caps we support */
|
|
||||||
if (tcon->ses->capabilities & CAP_UNIX)
|
|
||||||
reset_cifs_unix_caps(0 /* no xid */,
|
|
||||||
tcon,
|
|
||||||
NULL /* do not know sb */,
|
|
||||||
NULL /* no vol info */);
|
|
||||||
/* BB FIXME add code to check if wsize needs
|
/* BB FIXME add code to check if wsize needs
|
||||||
update due to negotiated smb buffer size
|
update due to negotiated smb buffer size
|
||||||
shrinking */
|
shrinking */
|
||||||
if (rc == 0)
|
if (rc == 0) {
|
||||||
atomic_inc(&tconInfoReconnectCount);
|
atomic_inc(&tconInfoReconnectCount);
|
||||||
|
/* tell server Unix caps we support */
|
||||||
|
if (tcon->ses->capabilities & CAP_UNIX)
|
||||||
|
reset_cifs_unix_caps(
|
||||||
|
0 /* no xid */,
|
||||||
|
tcon,
|
||||||
|
NULL /* do not know sb */,
|
||||||
|
NULL /* no vol info */);
|
||||||
|
}
|
||||||
|
|
||||||
cFYI(1, ("reconnect tcon rc = %d", rc));
|
cFYI(1, ("reconnect tcon rc = %d", rc));
|
||||||
/* Removed call to reopen open files here.
|
/* Removed call to reopen open files here.
|
||||||
|
|
Loading…
Reference in a new issue