diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 876eb9ef85fe..5d394c726860 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -182,6 +182,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
182 | 182 | ||
183 | while ((server->tcpStatus != CifsExiting) && (server->tcpStatus != CifsGood)) | 183 | while ((server->tcpStatus != CifsExiting) && (server->tcpStatus != CifsGood)) |
184 | { | 184 | { |
185 | try_to_freeze(); | ||
185 | if(server->protocolType == IPV6) { | 186 | if(server->protocolType == IPV6) { |
186 | rc = ipv6_connect(&server->addr.sockAddr6,&server->ssocket); | 187 | rc = ipv6_connect(&server->addr.sockAddr6,&server->ssocket); |
187 | } else { | 188 | } else { |
@@ -612,6 +613,10 @@ multi_t2_fnd: | |||
612 | #ifdef CONFIG_CIFS_STATS2 | 613 | #ifdef CONFIG_CIFS_STATS2 |
613 | mid_entry->when_received = jiffies; | 614 | mid_entry->when_received = jiffies; |
614 | #endif | 615 | #endif |
616 | /* so we do not time out requests to server | ||
617 | which is still responding (since server could | ||
618 | be busy but not dead) */ | ||
619 | server->lstrp = jiffies; | ||
615 | break; | 620 | break; |
616 | } | 621 | } |
617 | } | 622 | } |
@@ -1266,33 +1271,35 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName) | |||
1266 | 1271 | ||
1267 | read_lock(&GlobalSMBSeslock); | 1272 | read_lock(&GlobalSMBSeslock); |
1268 | list_for_each(tmp, &GlobalTreeConnectionList) { | 1273 | list_for_each(tmp, &GlobalTreeConnectionList) { |
1269 | cFYI(1, ("Next tcon - ")); | 1274 | cFYI(1, ("Next tcon")); |
1270 | tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); | 1275 | tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); |
1271 | if (tcon->ses) { | 1276 | if (tcon->ses) { |
1272 | if (tcon->ses->server) { | 1277 | if (tcon->ses->server) { |
1273 | cFYI(1, | 1278 | cFYI(1, |
1274 | (" old ip addr: %x == new ip %x ?", | 1279 | ("old ip addr: %x == new ip %x ?", |
1275 | tcon->ses->server->addr.sockAddr.sin_addr. | 1280 | tcon->ses->server->addr.sockAddr.sin_addr. |
1276 | s_addr, new_target_ip_addr)); | 1281 | s_addr, new_target_ip_addr)); |
1277 | if (tcon->ses->server->addr.sockAddr.sin_addr. | 1282 | if (tcon->ses->server->addr.sockAddr.sin_addr. |
1278 | s_addr == new_target_ip_addr) { | 1283 | s_addr == new_target_ip_addr) { |
1279 | /* BB lock tcon and server and tcp session and increment use count here? */ | 1284 | /* BB lock tcon, server and tcp session and increment use count here? */ |
1280 | /* found a match on the TCP session */ | 1285 | /* found a match on the TCP session */ |
1281 | /* BB check if reconnection needed */ | 1286 | /* BB check if reconnection needed */ |
1282 | cFYI(1,("Matched ip, old UNC: %s == new: %s ?", | 1287 | cFYI(1,("IP match, old UNC: %s new: %s", |
1283 | tcon->treeName, uncName)); | 1288 | tcon->treeName, uncName)); |
1284 | if (strncmp | 1289 | if (strncmp |
1285 | (tcon->treeName, uncName, | 1290 | (tcon->treeName, uncName, |
1286 | MAX_TREE_SIZE) == 0) { | 1291 | MAX_TREE_SIZE) == 0) { |
1287 | cFYI(1, | 1292 | cFYI(1, |
1288 | ("Matched UNC, old user: %s == new: %s ?", | 1293 | ("and old usr: %s new: %s", |
1289 | tcon->treeName, uncName)); | 1294 | tcon->treeName, uncName)); |
1290 | if (strncmp | 1295 | if (strncmp |
1291 | (tcon->ses->userName, | 1296 | (tcon->ses->userName, |
1292 | userName, | 1297 | userName, |
1293 | MAX_USERNAME_SIZE) == 0) { | 1298 | MAX_USERNAME_SIZE) == 0) { |
1294 | read_unlock(&GlobalSMBSeslock); | 1299 | read_unlock(&GlobalSMBSeslock); |
1295 | return tcon;/* also matched user (smb session)*/ | 1300 | /* matched smb session |
1301 | (user name */ | ||
1302 | return tcon; | ||
1296 | } | 1303 | } |
1297 | } | 1304 | } |
1298 | } | 1305 | } |
@@ -1969,7 +1976,18 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1969 | } | 1976 | } |
1970 | 1977 | ||
1971 | cFYI(1,("Negotiate caps 0x%x",(int)cap)); | 1978 | cFYI(1,("Negotiate caps 0x%x",(int)cap)); |
1972 | 1979 | #ifdef CONFIG_CIFS_DEBUG2 | |
1980 | if(cap & CIFS_UNIX_FCNTL_CAP) | ||
1981 | cFYI(1,("FCNTL cap")); | ||
1982 | if(cap & CIFS_UNIX_EXTATTR_CAP) | ||
1983 | cFYI(1,("EXTATTR cap")); | ||
1984 | if(cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) | ||
1985 | cFYI(1,("POSIX path cap")); | ||
1986 | if(cap & CIFS_UNIX_XATTR_CAP) | ||
1987 | cFYI(1,("XATTR cap")); | ||
1988 | if(cap & CIFS_UNIX_POSIX_ACL_CAP) | ||
1989 | cFYI(1,("POSIX ACL cap")); | ||
1990 | #endif /* CIFS_DEBUG2 */ | ||
1973 | if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { | 1991 | if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { |
1974 | cFYI(1,("setting capabilities failed")); | 1992 | cFYI(1,("setting capabilities failed")); |
1975 | } | 1993 | } |