diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 254 |
1 files changed, 125 insertions, 129 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d9566bf8f917..58a2109e7b33 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -135,7 +135,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
135 | spin_unlock(&GlobalMid_Lock); | 135 | spin_unlock(&GlobalMid_Lock); |
136 | server->maxBuf = 0; | 136 | server->maxBuf = 0; |
137 | 137 | ||
138 | cFYI(1, ("Reconnecting tcp session")); | 138 | cFYI(1, "Reconnecting tcp session"); |
139 | 139 | ||
140 | /* before reconnecting the tcp session, mark the smb session (uid) | 140 | /* before reconnecting the tcp session, mark the smb session (uid) |
141 | and the tid bad so they are not used until reconnected */ | 141 | and the tid bad so they are not used until reconnected */ |
@@ -153,12 +153,12 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
153 | /* do not want to be sending data on a socket we are freeing */ | 153 | /* do not want to be sending data on a socket we are freeing */ |
154 | mutex_lock(&server->srv_mutex); | 154 | mutex_lock(&server->srv_mutex); |
155 | if (server->ssocket) { | 155 | if (server->ssocket) { |
156 | cFYI(1, ("State: 0x%x Flags: 0x%lx", server->ssocket->state, | 156 | cFYI(1, "State: 0x%x Flags: 0x%lx", server->ssocket->state, |
157 | server->ssocket->flags)); | 157 | server->ssocket->flags); |
158 | kernel_sock_shutdown(server->ssocket, SHUT_WR); | 158 | kernel_sock_shutdown(server->ssocket, SHUT_WR); |
159 | cFYI(1, ("Post shutdown state: 0x%x Flags: 0x%lx", | 159 | cFYI(1, "Post shutdown state: 0x%x Flags: 0x%lx", |
160 | server->ssocket->state, | 160 | server->ssocket->state, |
161 | server->ssocket->flags)); | 161 | server->ssocket->flags); |
162 | sock_release(server->ssocket); | 162 | sock_release(server->ssocket); |
163 | server->ssocket = NULL; | 163 | server->ssocket = NULL; |
164 | } | 164 | } |
@@ -187,7 +187,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
187 | else | 187 | else |
188 | rc = ipv4_connect(server); | 188 | rc = ipv4_connect(server); |
189 | if (rc) { | 189 | if (rc) { |
190 | cFYI(1, ("reconnect error %d", rc)); | 190 | cFYI(1, "reconnect error %d", rc); |
191 | msleep(3000); | 191 | msleep(3000); |
192 | } else { | 192 | } else { |
193 | atomic_inc(&tcpSesReconnectCount); | 193 | atomic_inc(&tcpSesReconnectCount); |
@@ -223,7 +223,7 @@ static int check2ndT2(struct smb_hdr *pSMB, unsigned int maxBufSize) | |||
223 | /* check for plausible wct, bcc and t2 data and parm sizes */ | 223 | /* check for plausible wct, bcc and t2 data and parm sizes */ |
224 | /* check for parm and data offset going beyond end of smb */ | 224 | /* check for parm and data offset going beyond end of smb */ |
225 | if (pSMB->WordCount != 10) { /* coalesce_t2 depends on this */ | 225 | if (pSMB->WordCount != 10) { /* coalesce_t2 depends on this */ |
226 | cFYI(1, ("invalid transact2 word count")); | 226 | cFYI(1, "invalid transact2 word count"); |
227 | return -EINVAL; | 227 | return -EINVAL; |
228 | } | 228 | } |
229 | 229 | ||
@@ -237,15 +237,15 @@ static int check2ndT2(struct smb_hdr *pSMB, unsigned int maxBufSize) | |||
237 | if (remaining == 0) | 237 | if (remaining == 0) |
238 | return 0; | 238 | return 0; |
239 | else if (remaining < 0) { | 239 | else if (remaining < 0) { |
240 | cFYI(1, ("total data %d smaller than data in frame %d", | 240 | cFYI(1, "total data %d smaller than data in frame %d", |
241 | total_data_size, data_in_this_rsp)); | 241 | total_data_size, data_in_this_rsp); |
242 | return -EINVAL; | 242 | return -EINVAL; |
243 | } else { | 243 | } else { |
244 | cFYI(1, ("missing %d bytes from transact2, check next response", | 244 | cFYI(1, "missing %d bytes from transact2, check next response", |
245 | remaining)); | 245 | remaining); |
246 | if (total_data_size > maxBufSize) { | 246 | if (total_data_size > maxBufSize) { |
247 | cERROR(1, ("TotalDataSize %d is over maximum buffer %d", | 247 | cERROR(1, "TotalDataSize %d is over maximum buffer %d", |
248 | total_data_size, maxBufSize)); | 248 | total_data_size, maxBufSize); |
249 | return -EINVAL; | 249 | return -EINVAL; |
250 | } | 250 | } |
251 | return remaining; | 251 | return remaining; |
@@ -267,7 +267,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | |||
267 | total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); | 267 | total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); |
268 | 268 | ||
269 | if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { | 269 | if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { |
270 | cFYI(1, ("total data size of primary and secondary t2 differ")); | 270 | cFYI(1, "total data size of primary and secondary t2 differ"); |
271 | } | 271 | } |
272 | 272 | ||
273 | total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); | 273 | total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); |
@@ -282,7 +282,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | |||
282 | 282 | ||
283 | total_in_buf2 = le16_to_cpu(pSMB2->t2_rsp.DataCount); | 283 | total_in_buf2 = le16_to_cpu(pSMB2->t2_rsp.DataCount); |
284 | if (remaining < total_in_buf2) { | 284 | if (remaining < total_in_buf2) { |
285 | cFYI(1, ("transact2 2nd response contains too much data")); | 285 | cFYI(1, "transact2 2nd response contains too much data"); |
286 | } | 286 | } |
287 | 287 | ||
288 | /* find end of first SMB data area */ | 288 | /* find end of first SMB data area */ |
@@ -311,7 +311,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | |||
311 | pTargetSMB->smb_buf_length = byte_count; | 311 | pTargetSMB->smb_buf_length = byte_count; |
312 | 312 | ||
313 | if (remaining == total_in_buf2) { | 313 | if (remaining == total_in_buf2) { |
314 | cFYI(1, ("found the last secondary response")); | 314 | cFYI(1, "found the last secondary response"); |
315 | return 0; /* we are done */ | 315 | return 0; /* we are done */ |
316 | } else /* more responses to go */ | 316 | } else /* more responses to go */ |
317 | return 1; | 317 | return 1; |
@@ -339,7 +339,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
339 | int reconnect; | 339 | int reconnect; |
340 | 340 | ||
341 | current->flags |= PF_MEMALLOC; | 341 | current->flags |= PF_MEMALLOC; |
342 | cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current))); | 342 | cFYI(1, "Demultiplex PID: %d", task_pid_nr(current)); |
343 | 343 | ||
344 | length = atomic_inc_return(&tcpSesAllocCount); | 344 | length = atomic_inc_return(&tcpSesAllocCount); |
345 | if (length > 1) | 345 | if (length > 1) |
@@ -353,7 +353,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
353 | if (bigbuf == NULL) { | 353 | if (bigbuf == NULL) { |
354 | bigbuf = cifs_buf_get(); | 354 | bigbuf = cifs_buf_get(); |
355 | if (!bigbuf) { | 355 | if (!bigbuf) { |
356 | cERROR(1, ("No memory for large SMB response")); | 356 | cERROR(1, "No memory for large SMB response"); |
357 | msleep(3000); | 357 | msleep(3000); |
358 | /* retry will check if exiting */ | 358 | /* retry will check if exiting */ |
359 | continue; | 359 | continue; |
@@ -366,7 +366,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
366 | if (smallbuf == NULL) { | 366 | if (smallbuf == NULL) { |
367 | smallbuf = cifs_small_buf_get(); | 367 | smallbuf = cifs_small_buf_get(); |
368 | if (!smallbuf) { | 368 | if (!smallbuf) { |
369 | cERROR(1, ("No memory for SMB response")); | 369 | cERROR(1, "No memory for SMB response"); |
370 | msleep(1000); | 370 | msleep(1000); |
371 | /* retry will check if exiting */ | 371 | /* retry will check if exiting */ |
372 | continue; | 372 | continue; |
@@ -391,9 +391,9 @@ incomplete_rcv: | |||
391 | if (server->tcpStatus == CifsExiting) { | 391 | if (server->tcpStatus == CifsExiting) { |
392 | break; | 392 | break; |
393 | } else if (server->tcpStatus == CifsNeedReconnect) { | 393 | } else if (server->tcpStatus == CifsNeedReconnect) { |
394 | cFYI(1, ("Reconnect after server stopped responding")); | 394 | cFYI(1, "Reconnect after server stopped responding"); |
395 | cifs_reconnect(server); | 395 | cifs_reconnect(server); |
396 | cFYI(1, ("call to reconnect done")); | 396 | cFYI(1, "call to reconnect done"); |
397 | csocket = server->ssocket; | 397 | csocket = server->ssocket; |
398 | continue; | 398 | continue; |
399 | } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { | 399 | } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { |
@@ -411,7 +411,7 @@ incomplete_rcv: | |||
411 | continue; | 411 | continue; |
412 | } else if (length <= 0) { | 412 | } else if (length <= 0) { |
413 | if (server->tcpStatus == CifsNew) { | 413 | if (server->tcpStatus == CifsNew) { |
414 | cFYI(1, ("tcp session abend after SMBnegprot")); | 414 | cFYI(1, "tcp session abend after SMBnegprot"); |
415 | /* some servers kill the TCP session rather than | 415 | /* some servers kill the TCP session rather than |
416 | returning an SMB negprot error, in which | 416 | returning an SMB negprot error, in which |
417 | case reconnecting here is not going to help, | 417 | case reconnecting here is not going to help, |
@@ -419,18 +419,18 @@ incomplete_rcv: | |||
419 | break; | 419 | break; |
420 | } | 420 | } |
421 | if (!try_to_freeze() && (length == -EINTR)) { | 421 | if (!try_to_freeze() && (length == -EINTR)) { |
422 | cFYI(1, ("cifsd thread killed")); | 422 | cFYI(1, "cifsd thread killed"); |
423 | break; | 423 | break; |
424 | } | 424 | } |
425 | cFYI(1, ("Reconnect after unexpected peek error %d", | 425 | cFYI(1, "Reconnect after unexpected peek error %d", |
426 | length)); | 426 | length); |
427 | cifs_reconnect(server); | 427 | cifs_reconnect(server); |
428 | csocket = server->ssocket; | 428 | csocket = server->ssocket; |
429 | wake_up(&server->response_q); | 429 | wake_up(&server->response_q); |
430 | continue; | 430 | continue; |
431 | } else if (length < pdu_length) { | 431 | } else if (length < pdu_length) { |
432 | cFYI(1, ("requested %d bytes but only got %d bytes", | 432 | cFYI(1, "requested %d bytes but only got %d bytes", |
433 | pdu_length, length)); | 433 | pdu_length, length); |
434 | pdu_length -= length; | 434 | pdu_length -= length; |
435 | msleep(1); | 435 | msleep(1); |
436 | goto incomplete_rcv; | 436 | goto incomplete_rcv; |
@@ -450,18 +450,18 @@ incomplete_rcv: | |||
450 | pdu_length = be32_to_cpu((__force __be32)smb_buffer->smb_buf_length); | 450 | pdu_length = be32_to_cpu((__force __be32)smb_buffer->smb_buf_length); |
451 | smb_buffer->smb_buf_length = pdu_length; | 451 | smb_buffer->smb_buf_length = pdu_length; |
452 | 452 | ||
453 | cFYI(1, ("rfc1002 length 0x%x", pdu_length+4)); | 453 | cFYI(1, "rfc1002 length 0x%x", pdu_length+4); |
454 | 454 | ||
455 | if (temp == (char) RFC1002_SESSION_KEEP_ALIVE) { | 455 | if (temp == (char) RFC1002_SESSION_KEEP_ALIVE) { |
456 | continue; | 456 | continue; |
457 | } else if (temp == (char)RFC1002_POSITIVE_SESSION_RESPONSE) { | 457 | } else if (temp == (char)RFC1002_POSITIVE_SESSION_RESPONSE) { |
458 | cFYI(1, ("Good RFC 1002 session rsp")); | 458 | cFYI(1, "Good RFC 1002 session rsp"); |
459 | continue; | 459 | continue; |
460 | } else if (temp == (char)RFC1002_NEGATIVE_SESSION_RESPONSE) { | 460 | } else if (temp == (char)RFC1002_NEGATIVE_SESSION_RESPONSE) { |
461 | /* we get this from Windows 98 instead of | 461 | /* we get this from Windows 98 instead of |
462 | an error on SMB negprot response */ | 462 | an error on SMB negprot response */ |
463 | cFYI(1, ("Negative RFC1002 Session Response Error 0x%x)", | 463 | cFYI(1, "Negative RFC1002 Session Response Error 0x%x)", |
464 | pdu_length)); | 464 | pdu_length); |
465 | if (server->tcpStatus == CifsNew) { | 465 | if (server->tcpStatus == CifsNew) { |
466 | /* if nack on negprot (rather than | 466 | /* if nack on negprot (rather than |
467 | ret of smb negprot error) reconnecting | 467 | ret of smb negprot error) reconnecting |
@@ -484,7 +484,7 @@ incomplete_rcv: | |||
484 | continue; | 484 | continue; |
485 | } | 485 | } |
486 | } else if (temp != (char) 0) { | 486 | } else if (temp != (char) 0) { |
487 | cERROR(1, ("Unknown RFC 1002 frame")); | 487 | cERROR(1, "Unknown RFC 1002 frame"); |
488 | cifs_dump_mem(" Received Data: ", (char *)smb_buffer, | 488 | cifs_dump_mem(" Received Data: ", (char *)smb_buffer, |
489 | length); | 489 | length); |
490 | cifs_reconnect(server); | 490 | cifs_reconnect(server); |
@@ -495,8 +495,8 @@ incomplete_rcv: | |||
495 | /* else we have an SMB response */ | 495 | /* else we have an SMB response */ |
496 | if ((pdu_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) || | 496 | if ((pdu_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) || |
497 | (pdu_length < sizeof(struct smb_hdr) - 1 - 4)) { | 497 | (pdu_length < sizeof(struct smb_hdr) - 1 - 4)) { |
498 | cERROR(1, ("Invalid size SMB length %d pdu_length %d", | 498 | cERROR(1, "Invalid size SMB length %d pdu_length %d", |
499 | length, pdu_length+4)); | 499 | length, pdu_length+4); |
500 | cifs_reconnect(server); | 500 | cifs_reconnect(server); |
501 | csocket = server->ssocket; | 501 | csocket = server->ssocket; |
502 | wake_up(&server->response_q); | 502 | wake_up(&server->response_q); |
@@ -539,8 +539,8 @@ incomplete_rcv: | |||
539 | length = 0; | 539 | length = 0; |
540 | continue; | 540 | continue; |
541 | } else if (length <= 0) { | 541 | } else if (length <= 0) { |
542 | cERROR(1, ("Received no data, expecting %d", | 542 | cERROR(1, "Received no data, expecting %d", |
543 | pdu_length - total_read)); | 543 | pdu_length - total_read); |
544 | cifs_reconnect(server); | 544 | cifs_reconnect(server); |
545 | csocket = server->ssocket; | 545 | csocket = server->ssocket; |
546 | reconnect = 1; | 546 | reconnect = 1; |
@@ -588,7 +588,7 @@ incomplete_rcv: | |||
588 | } | 588 | } |
589 | } else { | 589 | } else { |
590 | if (!isLargeBuf) { | 590 | if (!isLargeBuf) { |
591 | cERROR(1,("1st trans2 resp needs bigbuf")); | 591 | cERROR(1, "1st trans2 resp needs bigbuf"); |
592 | /* BB maybe we can fix this up, switch | 592 | /* BB maybe we can fix this up, switch |
593 | to already allocated large buffer? */ | 593 | to already allocated large buffer? */ |
594 | } else { | 594 | } else { |
@@ -630,8 +630,8 @@ multi_t2_fnd: | |||
630 | wake_up_process(task_to_wake); | 630 | wake_up_process(task_to_wake); |
631 | } else if (!is_valid_oplock_break(smb_buffer, server) && | 631 | } else if (!is_valid_oplock_break(smb_buffer, server) && |
632 | !isMultiRsp) { | 632 | !isMultiRsp) { |
633 | cERROR(1, ("No task to wake, unknown frame received! " | 633 | cERROR(1, "No task to wake, unknown frame received! " |
634 | "NumMids %d", midCount.counter)); | 634 | "NumMids %d", midCount.counter); |
635 | cifs_dump_mem("Received Data is: ", (char *)smb_buffer, | 635 | cifs_dump_mem("Received Data is: ", (char *)smb_buffer, |
636 | sizeof(struct smb_hdr)); | 636 | sizeof(struct smb_hdr)); |
637 | #ifdef CONFIG_CIFS_DEBUG2 | 637 | #ifdef CONFIG_CIFS_DEBUG2 |
@@ -708,8 +708,8 @@ multi_t2_fnd: | |||
708 | list_for_each(tmp, &server->pending_mid_q) { | 708 | list_for_each(tmp, &server->pending_mid_q) { |
709 | mid_entry = list_entry(tmp, struct mid_q_entry, qhead); | 709 | mid_entry = list_entry(tmp, struct mid_q_entry, qhead); |
710 | if (mid_entry->midState == MID_REQUEST_SUBMITTED) { | 710 | if (mid_entry->midState == MID_REQUEST_SUBMITTED) { |
711 | cFYI(1, ("Clearing Mid 0x%x - waking up ", | 711 | cFYI(1, "Clearing Mid 0x%x - waking up ", |
712 | mid_entry->mid)); | 712 | mid_entry->mid); |
713 | task_to_wake = mid_entry->tsk; | 713 | task_to_wake = mid_entry->tsk; |
714 | if (task_to_wake) | 714 | if (task_to_wake) |
715 | wake_up_process(task_to_wake); | 715 | wake_up_process(task_to_wake); |
@@ -728,7 +728,7 @@ multi_t2_fnd: | |||
728 | to wait at least 45 seconds before giving up | 728 | to wait at least 45 seconds before giving up |
729 | on a request getting a response and going ahead | 729 | on a request getting a response and going ahead |
730 | and killing cifsd */ | 730 | and killing cifsd */ |
731 | cFYI(1, ("Wait for exit from demultiplex thread")); | 731 | cFYI(1, "Wait for exit from demultiplex thread"); |
732 | msleep(46000); | 732 | msleep(46000); |
733 | /* if threads still have not exited they are probably never | 733 | /* if threads still have not exited they are probably never |
734 | coming home not much else we can do but free the memory */ | 734 | coming home not much else we can do but free the memory */ |
@@ -849,7 +849,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
849 | separator[0] = options[4]; | 849 | separator[0] = options[4]; |
850 | options += 5; | 850 | options += 5; |
851 | } else { | 851 | } else { |
852 | cFYI(1, ("Null separator not allowed")); | 852 | cFYI(1, "Null separator not allowed"); |
853 | } | 853 | } |
854 | } | 854 | } |
855 | 855 | ||
@@ -974,7 +974,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
974 | } | 974 | } |
975 | } else if (strnicmp(data, "sec", 3) == 0) { | 975 | } else if (strnicmp(data, "sec", 3) == 0) { |
976 | if (!value || !*value) { | 976 | if (!value || !*value) { |
977 | cERROR(1, ("no security value specified")); | 977 | cERROR(1, "no security value specified"); |
978 | continue; | 978 | continue; |
979 | } else if (strnicmp(value, "krb5i", 5) == 0) { | 979 | } else if (strnicmp(value, "krb5i", 5) == 0) { |
980 | vol->secFlg |= CIFSSEC_MAY_KRB5 | | 980 | vol->secFlg |= CIFSSEC_MAY_KRB5 | |
@@ -982,7 +982,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
982 | } else if (strnicmp(value, "krb5p", 5) == 0) { | 982 | } else if (strnicmp(value, "krb5p", 5) == 0) { |
983 | /* vol->secFlg |= CIFSSEC_MUST_SEAL | | 983 | /* vol->secFlg |= CIFSSEC_MUST_SEAL | |
984 | CIFSSEC_MAY_KRB5; */ | 984 | CIFSSEC_MAY_KRB5; */ |
985 | cERROR(1, ("Krb5 cifs privacy not supported")); | 985 | cERROR(1, "Krb5 cifs privacy not supported"); |
986 | return 1; | 986 | return 1; |
987 | } else if (strnicmp(value, "krb5", 4) == 0) { | 987 | } else if (strnicmp(value, "krb5", 4) == 0) { |
988 | vol->secFlg |= CIFSSEC_MAY_KRB5; | 988 | vol->secFlg |= CIFSSEC_MAY_KRB5; |
@@ -1014,7 +1014,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1014 | } else if (strnicmp(value, "none", 4) == 0) { | 1014 | } else if (strnicmp(value, "none", 4) == 0) { |
1015 | vol->nullauth = 1; | 1015 | vol->nullauth = 1; |
1016 | } else { | 1016 | } else { |
1017 | cERROR(1, ("bad security option: %s", value)); | 1017 | cERROR(1, "bad security option: %s", value); |
1018 | return 1; | 1018 | return 1; |
1019 | } | 1019 | } |
1020 | } else if ((strnicmp(data, "unc", 3) == 0) | 1020 | } else if ((strnicmp(data, "unc", 3) == 0) |
@@ -1053,7 +1053,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1053 | a domain name and need special handling? */ | 1053 | a domain name and need special handling? */ |
1054 | if (strnlen(value, 256) < 256) { | 1054 | if (strnlen(value, 256) < 256) { |
1055 | vol->domainname = value; | 1055 | vol->domainname = value; |
1056 | cFYI(1, ("Domain name set")); | 1056 | cFYI(1, "Domain name set"); |
1057 | } else { | 1057 | } else { |
1058 | printk(KERN_WARNING "CIFS: domain name too " | 1058 | printk(KERN_WARNING "CIFS: domain name too " |
1059 | "long\n"); | 1059 | "long\n"); |
@@ -1076,7 +1076,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1076 | strcpy(vol->prepath+1, value); | 1076 | strcpy(vol->prepath+1, value); |
1077 | } else | 1077 | } else |
1078 | strcpy(vol->prepath, value); | 1078 | strcpy(vol->prepath, value); |
1079 | cFYI(1, ("prefix path %s", vol->prepath)); | 1079 | cFYI(1, "prefix path %s", vol->prepath); |
1080 | } else { | 1080 | } else { |
1081 | printk(KERN_WARNING "CIFS: prefix too long\n"); | 1081 | printk(KERN_WARNING "CIFS: prefix too long\n"); |
1082 | return 1; | 1082 | return 1; |
@@ -1092,7 +1092,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1092 | vol->iocharset = value; | 1092 | vol->iocharset = value; |
1093 | /* if iocharset not set then load_nls_default | 1093 | /* if iocharset not set then load_nls_default |
1094 | is used by caller */ | 1094 | is used by caller */ |
1095 | cFYI(1, ("iocharset set to %s", value)); | 1095 | cFYI(1, "iocharset set to %s", value); |
1096 | } else { | 1096 | } else { |
1097 | printk(KERN_WARNING "CIFS: iocharset name " | 1097 | printk(KERN_WARNING "CIFS: iocharset name " |
1098 | "too long.\n"); | 1098 | "too long.\n"); |
@@ -1144,14 +1144,14 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1144 | } | 1144 | } |
1145 | } else if (strnicmp(data, "sockopt", 5) == 0) { | 1145 | } else if (strnicmp(data, "sockopt", 5) == 0) { |
1146 | if (!value || !*value) { | 1146 | if (!value || !*value) { |
1147 | cERROR(1, ("no socket option specified")); | 1147 | cERROR(1, "no socket option specified"); |
1148 | continue; | 1148 | continue; |
1149 | } else if (strnicmp(value, "TCP_NODELAY", 11) == 0) { | 1149 | } else if (strnicmp(value, "TCP_NODELAY", 11) == 0) { |
1150 | vol->sockopt_tcp_nodelay = 1; | 1150 | vol->sockopt_tcp_nodelay = 1; |
1151 | } | 1151 | } |
1152 | } else if (strnicmp(data, "netbiosname", 4) == 0) { | 1152 | } else if (strnicmp(data, "netbiosname", 4) == 0) { |
1153 | if (!value || !*value || (*value == ' ')) { | 1153 | if (!value || !*value || (*value == ' ')) { |
1154 | cFYI(1, ("invalid (empty) netbiosname")); | 1154 | cFYI(1, "invalid (empty) netbiosname"); |
1155 | } else { | 1155 | } else { |
1156 | memset(vol->source_rfc1001_name, 0x20, 15); | 1156 | memset(vol->source_rfc1001_name, 0x20, 15); |
1157 | for (i = 0; i < 15; i++) { | 1157 | for (i = 0; i < 15; i++) { |
@@ -1175,7 +1175,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1175 | } else if (strnicmp(data, "servern", 7) == 0) { | 1175 | } else if (strnicmp(data, "servern", 7) == 0) { |
1176 | /* servernetbiosname specified override *SMBSERVER */ | 1176 | /* servernetbiosname specified override *SMBSERVER */ |
1177 | if (!value || !*value || (*value == ' ')) { | 1177 | if (!value || !*value || (*value == ' ')) { |
1178 | cFYI(1, ("empty server netbiosname specified")); | 1178 | cFYI(1, "empty server netbiosname specified"); |
1179 | } else { | 1179 | } else { |
1180 | /* last byte, type, is 0x20 for servr type */ | 1180 | /* last byte, type, is 0x20 for servr type */ |
1181 | memset(vol->target_rfc1001_name, 0x20, 16); | 1181 | memset(vol->target_rfc1001_name, 0x20, 16); |
@@ -1434,7 +1434,7 @@ cifs_find_tcp_session(struct sockaddr_storage *addr, unsigned short int port) | |||
1434 | 1434 | ||
1435 | ++server->srv_count; | 1435 | ++server->srv_count; |
1436 | write_unlock(&cifs_tcp_ses_lock); | 1436 | write_unlock(&cifs_tcp_ses_lock); |
1437 | cFYI(1, ("Existing tcp session with server found")); | 1437 | cFYI(1, "Existing tcp session with server found"); |
1438 | return server; | 1438 | return server; |
1439 | } | 1439 | } |
1440 | write_unlock(&cifs_tcp_ses_lock); | 1440 | write_unlock(&cifs_tcp_ses_lock); |
@@ -1475,7 +1475,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1475 | 1475 | ||
1476 | memset(&addr, 0, sizeof(struct sockaddr_storage)); | 1476 | memset(&addr, 0, sizeof(struct sockaddr_storage)); |
1477 | 1477 | ||
1478 | cFYI(1, ("UNC: %s ip: %s", volume_info->UNC, volume_info->UNCip)); | 1478 | cFYI(1, "UNC: %s ip: %s", volume_info->UNC, volume_info->UNCip); |
1479 | 1479 | ||
1480 | if (volume_info->UNCip && volume_info->UNC) { | 1480 | if (volume_info->UNCip && volume_info->UNC) { |
1481 | rc = cifs_convert_address(volume_info->UNCip, &addr); | 1481 | rc = cifs_convert_address(volume_info->UNCip, &addr); |
@@ -1487,13 +1487,12 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1487 | } else if (volume_info->UNCip) { | 1487 | } else if (volume_info->UNCip) { |
1488 | /* BB using ip addr as tcp_ses name to connect to the | 1488 | /* BB using ip addr as tcp_ses name to connect to the |
1489 | DFS root below */ | 1489 | DFS root below */ |
1490 | cERROR(1, ("Connecting to DFS root not implemented yet")); | 1490 | cERROR(1, "Connecting to DFS root not implemented yet"); |
1491 | rc = -EINVAL; | 1491 | rc = -EINVAL; |
1492 | goto out_err; | 1492 | goto out_err; |
1493 | } else /* which tcp_sess DFS root would we conect to */ { | 1493 | } else /* which tcp_sess DFS root would we conect to */ { |
1494 | cERROR(1, | 1494 | cERROR(1, "CIFS mount error: No UNC path (e.g. -o " |
1495 | ("CIFS mount error: No UNC path (e.g. -o " | 1495 | "unc=//192.168.1.100/public) specified"); |
1496 | "unc=//192.168.1.100/public) specified")); | ||
1497 | rc = -EINVAL; | 1496 | rc = -EINVAL; |
1498 | goto out_err; | 1497 | goto out_err; |
1499 | } | 1498 | } |
@@ -1540,7 +1539,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1540 | ++tcp_ses->srv_count; | 1539 | ++tcp_ses->srv_count; |
1541 | 1540 | ||
1542 | if (addr.ss_family == AF_INET6) { | 1541 | if (addr.ss_family == AF_INET6) { |
1543 | cFYI(1, ("attempting ipv6 connect")); | 1542 | cFYI(1, "attempting ipv6 connect"); |
1544 | /* BB should we allow ipv6 on port 139? */ | 1543 | /* BB should we allow ipv6 on port 139? */ |
1545 | /* other OS never observed in Wild doing 139 with v6 */ | 1544 | /* other OS never observed in Wild doing 139 with v6 */ |
1546 | sin_server6->sin6_port = htons(volume_info->port); | 1545 | sin_server6->sin6_port = htons(volume_info->port); |
@@ -1554,7 +1553,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1554 | rc = ipv4_connect(tcp_ses); | 1553 | rc = ipv4_connect(tcp_ses); |
1555 | } | 1554 | } |
1556 | if (rc < 0) { | 1555 | if (rc < 0) { |
1557 | cERROR(1, ("Error connecting to socket. Aborting operation")); | 1556 | cERROR(1, "Error connecting to socket. Aborting operation"); |
1558 | goto out_err; | 1557 | goto out_err; |
1559 | } | 1558 | } |
1560 | 1559 | ||
@@ -1567,7 +1566,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1567 | tcp_ses, "cifsd"); | 1566 | tcp_ses, "cifsd"); |
1568 | if (IS_ERR(tcp_ses->tsk)) { | 1567 | if (IS_ERR(tcp_ses->tsk)) { |
1569 | rc = PTR_ERR(tcp_ses->tsk); | 1568 | rc = PTR_ERR(tcp_ses->tsk); |
1570 | cERROR(1, ("error %d create cifsd thread", rc)); | 1569 | cERROR(1, "error %d create cifsd thread", rc); |
1571 | module_put(THIS_MODULE); | 1570 | module_put(THIS_MODULE); |
1572 | goto out_err; | 1571 | goto out_err; |
1573 | } | 1572 | } |
@@ -1703,8 +1702,7 @@ get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, | |||
1703 | strcpy(temp_unc + 2, pSesInfo->serverName); | 1702 | strcpy(temp_unc + 2, pSesInfo->serverName); |
1704 | strcpy(temp_unc + 2 + strlen(pSesInfo->serverName), "\\IPC$"); | 1703 | strcpy(temp_unc + 2 + strlen(pSesInfo->serverName), "\\IPC$"); |
1705 | rc = CIFSTCon(xid, pSesInfo, temp_unc, NULL, nls_codepage); | 1704 | rc = CIFSTCon(xid, pSesInfo, temp_unc, NULL, nls_codepage); |
1706 | cFYI(1, | 1705 | cFYI(1, "CIFS Tcon rc = %d ipc_tid = %d", rc, pSesInfo->ipc_tid); |
1707 | ("CIFS Tcon rc = %d ipc_tid = %d", rc, pSesInfo->ipc_tid)); | ||
1708 | kfree(temp_unc); | 1706 | kfree(temp_unc); |
1709 | } | 1707 | } |
1710 | if (rc == 0) | 1708 | if (rc == 0) |
@@ -1777,12 +1775,12 @@ ipv4_connect(struct TCP_Server_Info *server) | |||
1777 | rc = sock_create_kern(PF_INET, SOCK_STREAM, | 1775 | rc = sock_create_kern(PF_INET, SOCK_STREAM, |
1778 | IPPROTO_TCP, &socket); | 1776 | IPPROTO_TCP, &socket); |
1779 | if (rc < 0) { | 1777 | if (rc < 0) { |
1780 | cERROR(1, ("Error %d creating socket", rc)); | 1778 | cERROR(1, "Error %d creating socket", rc); |
1781 | return rc; | 1779 | return rc; |
1782 | } | 1780 | } |
1783 | 1781 | ||
1784 | /* BB other socket options to set KEEPALIVE, NODELAY? */ | 1782 | /* BB other socket options to set KEEPALIVE, NODELAY? */ |
1785 | cFYI(1, ("Socket created")); | 1783 | cFYI(1, "Socket created"); |
1786 | server->ssocket = socket; | 1784 | server->ssocket = socket; |
1787 | socket->sk->sk_allocation = GFP_NOFS; | 1785 | socket->sk->sk_allocation = GFP_NOFS; |
1788 | cifs_reclassify_socket4(socket); | 1786 | cifs_reclassify_socket4(socket); |
@@ -1827,7 +1825,7 @@ ipv4_connect(struct TCP_Server_Info *server) | |||
1827 | if (!connected) { | 1825 | if (!connected) { |
1828 | if (orig_port) | 1826 | if (orig_port) |
1829 | server->addr.sockAddr.sin_port = orig_port; | 1827 | server->addr.sockAddr.sin_port = orig_port; |
1830 | cFYI(1, ("Error %d connecting to server via ipv4", rc)); | 1828 | cFYI(1, "Error %d connecting to server via ipv4", rc); |
1831 | sock_release(socket); | 1829 | sock_release(socket); |
1832 | server->ssocket = NULL; | 1830 | server->ssocket = NULL; |
1833 | return rc; | 1831 | return rc; |
@@ -1855,12 +1853,12 @@ ipv4_connect(struct TCP_Server_Info *server) | |||
1855 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, | 1853 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, |
1856 | (char *)&val, sizeof(val)); | 1854 | (char *)&val, sizeof(val)); |
1857 | if (rc) | 1855 | if (rc) |
1858 | cFYI(1, ("set TCP_NODELAY socket option error %d", rc)); | 1856 | cFYI(1, "set TCP_NODELAY socket option error %d", rc); |
1859 | } | 1857 | } |
1860 | 1858 | ||
1861 | cFYI(1, ("sndbuf %d rcvbuf %d rcvtimeo 0x%lx", | 1859 | cFYI(1, "sndbuf %d rcvbuf %d rcvtimeo 0x%lx", |
1862 | socket->sk->sk_sndbuf, | 1860 | socket->sk->sk_sndbuf, |
1863 | socket->sk->sk_rcvbuf, socket->sk->sk_rcvtimeo)); | 1861 | socket->sk->sk_rcvbuf, socket->sk->sk_rcvtimeo); |
1864 | 1862 | ||
1865 | /* send RFC1001 sessinit */ | 1863 | /* send RFC1001 sessinit */ |
1866 | if (server->addr.sockAddr.sin_port == htons(RFC1001_PORT)) { | 1864 | if (server->addr.sockAddr.sin_port == htons(RFC1001_PORT)) { |
@@ -1938,13 +1936,13 @@ ipv6_connect(struct TCP_Server_Info *server) | |||
1938 | rc = sock_create_kern(PF_INET6, SOCK_STREAM, | 1936 | rc = sock_create_kern(PF_INET6, SOCK_STREAM, |
1939 | IPPROTO_TCP, &socket); | 1937 | IPPROTO_TCP, &socket); |
1940 | if (rc < 0) { | 1938 | if (rc < 0) { |
1941 | cERROR(1, ("Error %d creating ipv6 socket", rc)); | 1939 | cERROR(1, "Error %d creating ipv6 socket", rc); |
1942 | socket = NULL; | 1940 | socket = NULL; |
1943 | return rc; | 1941 | return rc; |
1944 | } | 1942 | } |
1945 | 1943 | ||
1946 | /* BB other socket options to set KEEPALIVE, NODELAY? */ | 1944 | /* BB other socket options to set KEEPALIVE, NODELAY? */ |
1947 | cFYI(1, ("ipv6 Socket created")); | 1945 | cFYI(1, "ipv6 Socket created"); |
1948 | server->ssocket = socket; | 1946 | server->ssocket = socket; |
1949 | socket->sk->sk_allocation = GFP_NOFS; | 1947 | socket->sk->sk_allocation = GFP_NOFS; |
1950 | cifs_reclassify_socket6(socket); | 1948 | cifs_reclassify_socket6(socket); |
@@ -1988,7 +1986,7 @@ ipv6_connect(struct TCP_Server_Info *server) | |||
1988 | if (!connected) { | 1986 | if (!connected) { |
1989 | if (orig_port) | 1987 | if (orig_port) |
1990 | server->addr.sockAddr6.sin6_port = orig_port; | 1988 | server->addr.sockAddr6.sin6_port = orig_port; |
1991 | cFYI(1, ("Error %d connecting to server via ipv6", rc)); | 1989 | cFYI(1, "Error %d connecting to server via ipv6", rc); |
1992 | sock_release(socket); | 1990 | sock_release(socket); |
1993 | server->ssocket = NULL; | 1991 | server->ssocket = NULL; |
1994 | return rc; | 1992 | return rc; |
@@ -2007,7 +2005,7 @@ ipv6_connect(struct TCP_Server_Info *server) | |||
2007 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, | 2005 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, |
2008 | (char *)&val, sizeof(val)); | 2006 | (char *)&val, sizeof(val)); |
2009 | if (rc) | 2007 | if (rc) |
2010 | cFYI(1, ("set TCP_NODELAY socket option error %d", rc)); | 2008 | cFYI(1, "set TCP_NODELAY socket option error %d", rc); |
2011 | } | 2009 | } |
2012 | 2010 | ||
2013 | server->ssocket = socket; | 2011 | server->ssocket = socket; |
@@ -2032,13 +2030,13 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2032 | if (vol_info && vol_info->no_linux_ext) { | 2030 | if (vol_info && vol_info->no_linux_ext) { |
2033 | tcon->fsUnixInfo.Capability = 0; | 2031 | tcon->fsUnixInfo.Capability = 0; |
2034 | tcon->unix_ext = 0; /* Unix Extensions disabled */ | 2032 | tcon->unix_ext = 0; /* Unix Extensions disabled */ |
2035 | cFYI(1, ("Linux protocol extensions disabled")); | 2033 | cFYI(1, "Linux protocol extensions disabled"); |
2036 | return; | 2034 | return; |
2037 | } else if (vol_info) | 2035 | } else if (vol_info) |
2038 | tcon->unix_ext = 1; /* Unix Extensions supported */ | 2036 | tcon->unix_ext = 1; /* Unix Extensions supported */ |
2039 | 2037 | ||
2040 | if (tcon->unix_ext == 0) { | 2038 | if (tcon->unix_ext == 0) { |
2041 | cFYI(1, ("Unix extensions disabled so not set on reconnect")); | 2039 | cFYI(1, "Unix extensions disabled so not set on reconnect"); |
2042 | return; | 2040 | return; |
2043 | } | 2041 | } |
2044 | 2042 | ||
@@ -2054,12 +2052,11 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2054 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; | 2052 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; |
2055 | if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { | 2053 | if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { |
2056 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) | 2054 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) |
2057 | cERROR(1, ("POSIXPATH support change")); | 2055 | cERROR(1, "POSIXPATH support change"); |
2058 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; | 2056 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; |
2059 | } else if ((cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { | 2057 | } else if ((cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { |
2060 | cERROR(1, ("possible reconnect error")); | 2058 | cERROR(1, "possible reconnect error"); |
2061 | cERROR(1, | 2059 | cERROR(1, "server disabled POSIX path support"); |
2062 | ("server disabled POSIX path support")); | ||
2063 | } | 2060 | } |
2064 | } | 2061 | } |
2065 | 2062 | ||
@@ -2067,7 +2064,7 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2067 | if (vol_info && vol_info->no_psx_acl) | 2064 | if (vol_info && vol_info->no_psx_acl) |
2068 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; | 2065 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; |
2069 | else if (CIFS_UNIX_POSIX_ACL_CAP & cap) { | 2066 | else if (CIFS_UNIX_POSIX_ACL_CAP & cap) { |
2070 | cFYI(1, ("negotiated posix acl support")); | 2067 | cFYI(1, "negotiated posix acl support"); |
2071 | if (sb) | 2068 | if (sb) |
2072 | sb->s_flags |= MS_POSIXACL; | 2069 | sb->s_flags |= MS_POSIXACL; |
2073 | } | 2070 | } |
@@ -2075,7 +2072,7 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2075 | if (vol_info && vol_info->posix_paths == 0) | 2072 | if (vol_info && vol_info->posix_paths == 0) |
2076 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; | 2073 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; |
2077 | else if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) { | 2074 | else if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) { |
2078 | cFYI(1, ("negotiate posix pathnames")); | 2075 | cFYI(1, "negotiate posix pathnames"); |
2079 | if (sb) | 2076 | if (sb) |
2080 | CIFS_SB(sb)->mnt_cifs_flags |= | 2077 | CIFS_SB(sb)->mnt_cifs_flags |= |
2081 | CIFS_MOUNT_POSIX_PATHS; | 2078 | CIFS_MOUNT_POSIX_PATHS; |
@@ -2090,39 +2087,38 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2090 | if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) { | 2087 | if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) { |
2091 | if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) { | 2088 | if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) { |
2092 | CIFS_SB(sb)->rsize = 127 * 1024; | 2089 | CIFS_SB(sb)->rsize = 127 * 1024; |
2093 | cFYI(DBG2, | 2090 | cFYI(DBG2, "larger reads not supported by srv"); |
2094 | ("larger reads not supported by srv")); | ||
2095 | } | 2091 | } |
2096 | } | 2092 | } |
2097 | 2093 | ||
2098 | 2094 | ||
2099 | cFYI(1, ("Negotiate caps 0x%x", (int)cap)); | 2095 | cFYI(1, "Negotiate caps 0x%x", (int)cap); |
2100 | #ifdef CONFIG_CIFS_DEBUG2 | 2096 | #ifdef CONFIG_CIFS_DEBUG2 |
2101 | if (cap & CIFS_UNIX_FCNTL_CAP) | 2097 | if (cap & CIFS_UNIX_FCNTL_CAP) |
2102 | cFYI(1, ("FCNTL cap")); | 2098 | cFYI(1, "FCNTL cap"); |
2103 | if (cap & CIFS_UNIX_EXTATTR_CAP) | 2099 | if (cap & CIFS_UNIX_EXTATTR_CAP) |
2104 | cFYI(1, ("EXTATTR cap")); | 2100 | cFYI(1, "EXTATTR cap"); |
2105 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) | 2101 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) |
2106 | cFYI(1, ("POSIX path cap")); | 2102 | cFYI(1, "POSIX path cap"); |
2107 | if (cap & CIFS_UNIX_XATTR_CAP) | 2103 | if (cap & CIFS_UNIX_XATTR_CAP) |
2108 | cFYI(1, ("XATTR cap")); | 2104 | cFYI(1, "XATTR cap"); |
2109 | if (cap & CIFS_UNIX_POSIX_ACL_CAP) | 2105 | if (cap & CIFS_UNIX_POSIX_ACL_CAP) |
2110 | cFYI(1, ("POSIX ACL cap")); | 2106 | cFYI(1, "POSIX ACL cap"); |
2111 | if (cap & CIFS_UNIX_LARGE_READ_CAP) | 2107 | if (cap & CIFS_UNIX_LARGE_READ_CAP) |
2112 | cFYI(1, ("very large read cap")); | 2108 | cFYI(1, "very large read cap"); |
2113 | if (cap & CIFS_UNIX_LARGE_WRITE_CAP) | 2109 | if (cap & CIFS_UNIX_LARGE_WRITE_CAP) |
2114 | cFYI(1, ("very large write cap")); | 2110 | cFYI(1, "very large write cap"); |
2115 | #endif /* CIFS_DEBUG2 */ | 2111 | #endif /* CIFS_DEBUG2 */ |
2116 | if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { | 2112 | if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { |
2117 | if (vol_info == NULL) { | 2113 | if (vol_info == NULL) { |
2118 | cFYI(1, ("resetting capabilities failed")); | 2114 | cFYI(1, "resetting capabilities failed"); |
2119 | } else | 2115 | } else |
2120 | cERROR(1, ("Negotiating Unix capabilities " | 2116 | cERROR(1, "Negotiating Unix capabilities " |
2121 | "with the server failed. Consider " | 2117 | "with the server failed. Consider " |
2122 | "mounting with the Unix Extensions\n" | 2118 | "mounting with the Unix Extensions\n" |
2123 | "disabled, if problems are found, " | 2119 | "disabled, if problems are found, " |
2124 | "by specifying the nounix mount " | 2120 | "by specifying the nounix mount " |
2125 | "option.")); | 2121 | "option."); |
2126 | 2122 | ||
2127 | } | 2123 | } |
2128 | } | 2124 | } |
@@ -2152,8 +2148,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2152 | struct cifs_sb_info *cifs_sb) | 2148 | struct cifs_sb_info *cifs_sb) |
2153 | { | 2149 | { |
2154 | if (pvolume_info->rsize > CIFSMaxBufSize) { | 2150 | if (pvolume_info->rsize > CIFSMaxBufSize) { |
2155 | cERROR(1, ("rsize %d too large, using MaxBufSize", | 2151 | cERROR(1, "rsize %d too large, using MaxBufSize", |
2156 | pvolume_info->rsize)); | 2152 | pvolume_info->rsize); |
2157 | cifs_sb->rsize = CIFSMaxBufSize; | 2153 | cifs_sb->rsize = CIFSMaxBufSize; |
2158 | } else if ((pvolume_info->rsize) && | 2154 | } else if ((pvolume_info->rsize) && |
2159 | (pvolume_info->rsize <= CIFSMaxBufSize)) | 2155 | (pvolume_info->rsize <= CIFSMaxBufSize)) |
@@ -2162,8 +2158,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2162 | cifs_sb->rsize = CIFSMaxBufSize; | 2158 | cifs_sb->rsize = CIFSMaxBufSize; |
2163 | 2159 | ||
2164 | if (pvolume_info->wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) { | 2160 | if (pvolume_info->wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) { |
2165 | cERROR(1, ("wsize %d too large, using 4096 instead", | 2161 | cERROR(1, "wsize %d too large, using 4096 instead", |
2166 | pvolume_info->wsize)); | 2162 | pvolume_info->wsize); |
2167 | cifs_sb->wsize = 4096; | 2163 | cifs_sb->wsize = 4096; |
2168 | } else if (pvolume_info->wsize) | 2164 | } else if (pvolume_info->wsize) |
2169 | cifs_sb->wsize = pvolume_info->wsize; | 2165 | cifs_sb->wsize = pvolume_info->wsize; |
@@ -2181,7 +2177,7 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2181 | if (cifs_sb->rsize < 2048) { | 2177 | if (cifs_sb->rsize < 2048) { |
2182 | cifs_sb->rsize = 2048; | 2178 | cifs_sb->rsize = 2048; |
2183 | /* Windows ME may prefer this */ | 2179 | /* Windows ME may prefer this */ |
2184 | cFYI(1, ("readsize set to minimum: 2048")); | 2180 | cFYI(1, "readsize set to minimum: 2048"); |
2185 | } | 2181 | } |
2186 | /* calculate prepath */ | 2182 | /* calculate prepath */ |
2187 | cifs_sb->prepath = pvolume_info->prepath; | 2183 | cifs_sb->prepath = pvolume_info->prepath; |
@@ -2199,8 +2195,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2199 | cifs_sb->mnt_gid = pvolume_info->linux_gid; | 2195 | cifs_sb->mnt_gid = pvolume_info->linux_gid; |
2200 | cifs_sb->mnt_file_mode = pvolume_info->file_mode; | 2196 | cifs_sb->mnt_file_mode = pvolume_info->file_mode; |
2201 | cifs_sb->mnt_dir_mode = pvolume_info->dir_mode; | 2197 | cifs_sb->mnt_dir_mode = pvolume_info->dir_mode; |
2202 | cFYI(1, ("file mode: 0x%x dir mode: 0x%x", | 2198 | cFYI(1, "file mode: 0x%x dir mode: 0x%x", |
2203 | cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode)); | 2199 | cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); |
2204 | 2200 | ||
2205 | if (pvolume_info->noperm) | 2201 | if (pvolume_info->noperm) |
2206 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM; | 2202 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM; |
@@ -2229,13 +2225,13 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2229 | if (pvolume_info->dynperm) | 2225 | if (pvolume_info->dynperm) |
2230 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; | 2226 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; |
2231 | if (pvolume_info->direct_io) { | 2227 | if (pvolume_info->direct_io) { |
2232 | cFYI(1, ("mounting share using direct i/o")); | 2228 | cFYI(1, "mounting share using direct i/o"); |
2233 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; | 2229 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; |
2234 | } | 2230 | } |
2235 | 2231 | ||
2236 | if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm)) | 2232 | if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm)) |
2237 | cERROR(1, ("mount option dynperm ignored if cifsacl " | 2233 | cERROR(1, "mount option dynperm ignored if cifsacl " |
2238 | "mount option supported")); | 2234 | "mount option supported"); |
2239 | } | 2235 | } |
2240 | 2236 | ||
2241 | static int | 2237 | static int |
@@ -2344,11 +2340,11 @@ try_mount_again: | |||
2344 | } | 2340 | } |
2345 | 2341 | ||
2346 | if (volume_info->nullauth) { | 2342 | if (volume_info->nullauth) { |
2347 | cFYI(1, ("null user")); | 2343 | cFYI(1, "null user"); |
2348 | volume_info->username = ""; | 2344 | volume_info->username = ""; |
2349 | } else if (volume_info->username) { | 2345 | } else if (volume_info->username) { |
2350 | /* BB fixme parse for domain name here */ | 2346 | /* BB fixme parse for domain name here */ |
2351 | cFYI(1, ("Username: %s", volume_info->username)); | 2347 | cFYI(1, "Username: %s", volume_info->username); |
2352 | } else { | 2348 | } else { |
2353 | cifserror("No username specified"); | 2349 | cifserror("No username specified"); |
2354 | /* In userspace mount helper we can get user name from alternate | 2350 | /* In userspace mount helper we can get user name from alternate |
@@ -2365,8 +2361,8 @@ try_mount_again: | |||
2365 | } else { | 2361 | } else { |
2366 | cifs_sb->local_nls = load_nls(volume_info->iocharset); | 2362 | cifs_sb->local_nls = load_nls(volume_info->iocharset); |
2367 | if (cifs_sb->local_nls == NULL) { | 2363 | if (cifs_sb->local_nls == NULL) { |
2368 | cERROR(1, ("CIFS mount error: iocharset %s not found", | 2364 | cERROR(1, "CIFS mount error: iocharset %s not found", |
2369 | volume_info->iocharset)); | 2365 | volume_info->iocharset); |
2370 | rc = -ELIBACC; | 2366 | rc = -ELIBACC; |
2371 | goto out; | 2367 | goto out; |
2372 | } | 2368 | } |
@@ -2381,8 +2377,8 @@ try_mount_again: | |||
2381 | 2377 | ||
2382 | pSesInfo = cifs_find_smb_ses(srvTcp, volume_info->username); | 2378 | pSesInfo = cifs_find_smb_ses(srvTcp, volume_info->username); |
2383 | if (pSesInfo) { | 2379 | if (pSesInfo) { |
2384 | cFYI(1, ("Existing smb sess found (status=%d)", | 2380 | cFYI(1, "Existing smb sess found (status=%d)", |
2385 | pSesInfo->status)); | 2381 | pSesInfo->status); |
2386 | /* | 2382 | /* |
2387 | * The existing SMB session already has a reference to srvTcp, | 2383 | * The existing SMB session already has a reference to srvTcp, |
2388 | * so we can put back the extra one we got before | 2384 | * so we can put back the extra one we got before |
@@ -2391,13 +2387,13 @@ try_mount_again: | |||
2391 | 2387 | ||
2392 | mutex_lock(&pSesInfo->session_mutex); | 2388 | mutex_lock(&pSesInfo->session_mutex); |
2393 | if (pSesInfo->need_reconnect) { | 2389 | if (pSesInfo->need_reconnect) { |
2394 | cFYI(1, ("Session needs reconnect")); | 2390 | cFYI(1, "Session needs reconnect"); |
2395 | rc = cifs_setup_session(xid, pSesInfo, | 2391 | rc = cifs_setup_session(xid, pSesInfo, |
2396 | cifs_sb->local_nls); | 2392 | cifs_sb->local_nls); |
2397 | } | 2393 | } |
2398 | mutex_unlock(&pSesInfo->session_mutex); | 2394 | mutex_unlock(&pSesInfo->session_mutex); |
2399 | } else if (!rc) { | 2395 | } else if (!rc) { |
2400 | cFYI(1, ("Existing smb sess not found")); | 2396 | cFYI(1, "Existing smb sess not found"); |
2401 | pSesInfo = sesInfoAlloc(); | 2397 | pSesInfo = sesInfoAlloc(); |
2402 | if (pSesInfo == NULL) { | 2398 | if (pSesInfo == NULL) { |
2403 | rc = -ENOMEM; | 2399 | rc = -ENOMEM; |
@@ -2452,12 +2448,12 @@ try_mount_again: | |||
2452 | 2448 | ||
2453 | tcon = cifs_find_tcon(pSesInfo, volume_info->UNC); | 2449 | tcon = cifs_find_tcon(pSesInfo, volume_info->UNC); |
2454 | if (tcon) { | 2450 | if (tcon) { |
2455 | cFYI(1, ("Found match on UNC path")); | 2451 | cFYI(1, "Found match on UNC path"); |
2456 | /* existing tcon already has a reference */ | 2452 | /* existing tcon already has a reference */ |
2457 | cifs_put_smb_ses(pSesInfo); | 2453 | cifs_put_smb_ses(pSesInfo); |
2458 | if (tcon->seal != volume_info->seal) | 2454 | if (tcon->seal != volume_info->seal) |
2459 | cERROR(1, ("transport encryption setting " | 2455 | cERROR(1, "transport encryption setting " |
2460 | "conflicts with existing tid")); | 2456 | "conflicts with existing tid"); |
2461 | } else { | 2457 | } else { |
2462 | tcon = tconInfoAlloc(); | 2458 | tcon = tconInfoAlloc(); |
2463 | if (tcon == NULL) { | 2459 | if (tcon == NULL) { |
@@ -2477,7 +2473,7 @@ try_mount_again: | |||
2477 | 2473 | ||
2478 | if ((strchr(volume_info->UNC + 3, '\\') == NULL) | 2474 | if ((strchr(volume_info->UNC + 3, '\\') == NULL) |
2479 | && (strchr(volume_info->UNC + 3, '/') == NULL)) { | 2475 | && (strchr(volume_info->UNC + 3, '/') == NULL)) { |
2480 | cERROR(1, ("Missing share name")); | 2476 | cERROR(1, "Missing share name"); |
2481 | rc = -ENODEV; | 2477 | rc = -ENODEV; |
2482 | goto mount_fail_check; | 2478 | goto mount_fail_check; |
2483 | } else { | 2479 | } else { |
@@ -2486,11 +2482,11 @@ try_mount_again: | |||
2486 | * we do on SessSetup and reconnect? */ | 2482 | * we do on SessSetup and reconnect? */ |
2487 | rc = CIFSTCon(xid, pSesInfo, volume_info->UNC, | 2483 | rc = CIFSTCon(xid, pSesInfo, volume_info->UNC, |
2488 | tcon, cifs_sb->local_nls); | 2484 | tcon, cifs_sb->local_nls); |
2489 | cFYI(1, ("CIFS Tcon rc = %d", rc)); | 2485 | cFYI(1, "CIFS Tcon rc = %d", rc); |
2490 | if (volume_info->nodfs) { | 2486 | if (volume_info->nodfs) { |
2491 | tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; | 2487 | tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; |
2492 | cFYI(1, ("DFS disabled (%d)", | 2488 | cFYI(1, "DFS disabled (%d)", |
2493 | tcon->Flags)); | 2489 | tcon->Flags); |
2494 | } | 2490 | } |
2495 | } | 2491 | } |
2496 | if (rc) | 2492 | if (rc) |
@@ -2544,7 +2540,7 @@ try_mount_again: | |||
2544 | 2540 | ||
2545 | if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) { | 2541 | if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) { |
2546 | cifs_sb->rsize = 1024 * 127; | 2542 | cifs_sb->rsize = 1024 * 127; |
2547 | cFYI(DBG2, ("no very large read support, rsize now 127K")); | 2543 | cFYI(DBG2, "no very large read support, rsize now 127K"); |
2548 | } | 2544 | } |
2549 | if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X)) | 2545 | if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X)) |
2550 | cifs_sb->wsize = min(cifs_sb->wsize, | 2546 | cifs_sb->wsize = min(cifs_sb->wsize, |
@@ -2593,7 +2589,7 @@ remote_path_check: | |||
2593 | goto mount_fail_check; | 2589 | goto mount_fail_check; |
2594 | } | 2590 | } |
2595 | 2591 | ||
2596 | cFYI(1, ("Getting referral for: %s", full_path)); | 2592 | cFYI(1, "Getting referral for: %s", full_path); |
2597 | rc = get_dfs_path(xid, pSesInfo , full_path + 1, | 2593 | rc = get_dfs_path(xid, pSesInfo , full_path + 1, |
2598 | cifs_sb->local_nls, &num_referrals, &referrals, | 2594 | cifs_sb->local_nls, &num_referrals, &referrals, |
2599 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 2595 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
@@ -2778,13 +2774,13 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
2778 | if (length == 3) { | 2774 | if (length == 3) { |
2779 | if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') && | 2775 | if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') && |
2780 | (bcc_ptr[2] == 'C')) { | 2776 | (bcc_ptr[2] == 'C')) { |
2781 | cFYI(1, ("IPC connection")); | 2777 | cFYI(1, "IPC connection"); |
2782 | tcon->ipc = 1; | 2778 | tcon->ipc = 1; |
2783 | } | 2779 | } |
2784 | } else if (length == 2) { | 2780 | } else if (length == 2) { |
2785 | if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) { | 2781 | if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) { |
2786 | /* the most common case */ | 2782 | /* the most common case */ |
2787 | cFYI(1, ("disk share connection")); | 2783 | cFYI(1, "disk share connection"); |
2788 | } | 2784 | } |
2789 | } | 2785 | } |
2790 | bcc_ptr += length + 1; | 2786 | bcc_ptr += length + 1; |
@@ -2797,7 +2793,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
2797 | bytes_left, is_unicode, | 2793 | bytes_left, is_unicode, |
2798 | nls_codepage); | 2794 | nls_codepage); |
2799 | 2795 | ||
2800 | cFYI(1, ("nativeFileSystem=%s", tcon->nativeFileSystem)); | 2796 | cFYI(1, "nativeFileSystem=%s", tcon->nativeFileSystem); |
2801 | 2797 | ||
2802 | if ((smb_buffer_response->WordCount == 3) || | 2798 | if ((smb_buffer_response->WordCount == 3) || |
2803 | (smb_buffer_response->WordCount == 7)) | 2799 | (smb_buffer_response->WordCount == 7)) |
@@ -2805,7 +2801,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
2805 | tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport); | 2801 | tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport); |
2806 | else | 2802 | else |
2807 | tcon->Flags = 0; | 2803 | tcon->Flags = 0; |
2808 | cFYI(1, ("Tcon flags: 0x%x ", tcon->Flags)); | 2804 | cFYI(1, "Tcon flags: 0x%x ", tcon->Flags); |
2809 | } else if ((rc == 0) && tcon == NULL) { | 2805 | } else if ((rc == 0) && tcon == NULL) { |
2810 | /* all we need to save for IPC$ connection */ | 2806 | /* all we need to save for IPC$ connection */ |
2811 | ses->ipc_tid = smb_buffer_response->Tid; | 2807 | ses->ipc_tid = smb_buffer_response->Tid; |
@@ -2869,14 +2865,14 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo, | |||
2869 | if (linuxExtEnabled == 0) | 2865 | if (linuxExtEnabled == 0) |
2870 | pSesInfo->capabilities &= (~CAP_UNIX); | 2866 | pSesInfo->capabilities &= (~CAP_UNIX); |
2871 | 2867 | ||
2872 | cFYI(1, ("Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", | 2868 | cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", |
2873 | server->secMode, server->capabilities, server->timeAdj)); | 2869 | server->secMode, server->capabilities, server->timeAdj); |
2874 | 2870 | ||
2875 | rc = CIFS_SessSetup(xid, pSesInfo, first_time, nls_info); | 2871 | rc = CIFS_SessSetup(xid, pSesInfo, first_time, nls_info); |
2876 | if (rc) { | 2872 | if (rc) { |
2877 | cERROR(1, ("Send error in SessSetup = %d", rc)); | 2873 | cERROR(1, "Send error in SessSetup = %d", rc); |
2878 | } else { | 2874 | } else { |
2879 | cFYI(1, ("CIFS Session Established successfully")); | 2875 | cFYI(1, "CIFS Session Established successfully"); |
2880 | spin_lock(&GlobalMid_Lock); | 2876 | spin_lock(&GlobalMid_Lock); |
2881 | pSesInfo->status = CifsGood; | 2877 | pSesInfo->status = CifsGood; |
2882 | pSesInfo->need_reconnect = false; | 2878 | pSesInfo->need_reconnect = false; |