aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index e43cb880f54a..21cac15ed9a7 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2186,8 +2186,10 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2186 tcon->ses = pSesInfo; 2186 tcon->ses = pSesInfo;
2187 2187
2188 /* do not care if following two calls succeed - informational */ 2188 /* do not care if following two calls succeed - informational */
2189 CIFSSMBQFSDeviceInfo(xid, tcon); 2189 if (!tcon->ipc) {
2190 CIFSSMBQFSAttributeInfo(xid, tcon); 2190 CIFSSMBQFSDeviceInfo(xid, tcon);
2191 CIFSSMBQFSAttributeInfo(xid, tcon);
2192 }
2191 2193
2192 /* tell server which Unix caps we support */ 2194 /* tell server which Unix caps we support */
2193 if (tcon->ses->capabilities & CAP_UNIX) 2195 if (tcon->ses->capabilities & CAP_UNIX)
@@ -3385,6 +3387,18 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3385 bcc_ptr = pByteArea(smb_buffer_response); 3387 bcc_ptr = pByteArea(smb_buffer_response);
3386 length = strnlen(bcc_ptr, BCC(smb_buffer_response) - 2); 3388 length = strnlen(bcc_ptr, BCC(smb_buffer_response) - 2);
3387 /* skip service field (NB: this field is always ASCII) */ 3389 /* skip service field (NB: this field is always ASCII) */
3390 if (length == 3) {
3391 if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') &&
3392 (bcc_ptr[2] == 'C')) {
3393 cFYI(1, ("IPC connection"));
3394 tcon->ipc = 1;
3395 }
3396 } else if (length == 2) {
3397 if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) {
3398 /* the most common case */
3399 cFYI(1, ("disk share connection"));
3400 }
3401 }
3388 bcc_ptr += length + 1; 3402 bcc_ptr += length + 1;
3389 strncpy(tcon->treeName, tree, MAX_TREE_SIZE); 3403 strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
3390 if (smb_buffer->Flags2 & SMBFLG2_UNICODE) { 3404 if (smb_buffer->Flags2 & SMBFLG2_UNICODE) {