cifs: add cFYI messages with some of the saved strings from ssetup/tcon

...to make it easier to find problems in this area in the future.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

authored by Jeff Layton and committed by Steve French 313fecfa f083def6

+11 -3
+4 -1
fs/cifs/connect.c
··· 3757 kfree(tcon->nativeFileSystem); 3758 tcon->nativeFileSystem = 3759 kzalloc((4 * length) + 2, GFP_KERNEL); 3760 - if (tcon->nativeFileSystem) 3761 cifs_strfromUCS_le( 3762 tcon->nativeFileSystem, 3763 (__le16 *) bcc_ptr, 3764 length, nls_codepage); 3765 bcc_ptr += (2 * length) + 2; 3766 } 3767 /* else do not bother copying these information fields*/
··· 3757 kfree(tcon->nativeFileSystem); 3758 tcon->nativeFileSystem = 3759 kzalloc((4 * length) + 2, GFP_KERNEL); 3760 + if (tcon->nativeFileSystem) { 3761 cifs_strfromUCS_le( 3762 tcon->nativeFileSystem, 3763 (__le16 *) bcc_ptr, 3764 length, nls_codepage); 3765 + cFYI(1, ("nativeFileSystem=%s", 3766 + tcon->nativeFileSystem)); 3767 + } 3768 bcc_ptr += (2 * length) + 2; 3769 } 3770 /* else do not bother copying these information fields*/
+7 -2
fs/cifs/sess.c
··· 311 kfree(ses->serverOS); 312 /* UTF-8 string will not grow more than four times as big as UCS-16 */ 313 ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); 314 - if (ses->serverOS != NULL) 315 cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); 316 data += 2 * (len + 1); 317 words_left -= len + 1; 318 ··· 329 if (ses->serverNOS != NULL) { 330 cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, 331 nls_cp); 332 if (strncmp(ses->serverNOS, "NT LAN Manager 4", 16) == 0) { 333 cFYI(1, ("NT4 server")); 334 ses->flags |= CIFS_SES_NT4; ··· 346 347 kfree(ses->serverDomain); 348 ses->serverDomain = kzalloc((4 * len) + 2, GFP_KERNEL); 349 - if (ses->serverDomain != NULL) 350 cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len, 351 nls_cp); 352 data += 2 * (len + 1); 353 words_left -= len + 1; 354
··· 311 kfree(ses->serverOS); 312 /* UTF-8 string will not grow more than four times as big as UCS-16 */ 313 ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); 314 + if (ses->serverOS != NULL) { 315 cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); 316 + cFYI(1, ("serverOS=%s", ses->serverOS)); 317 + } 318 data += 2 * (len + 1); 319 words_left -= len + 1; 320 ··· 327 if (ses->serverNOS != NULL) { 328 cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, 329 nls_cp); 330 + cFYI(1, ("serverNOS=%s", ses->serverNOS)); 331 if (strncmp(ses->serverNOS, "NT LAN Manager 4", 16) == 0) { 332 cFYI(1, ("NT4 server")); 333 ses->flags |= CIFS_SES_NT4; ··· 343 344 kfree(ses->serverDomain); 345 ses->serverDomain = kzalloc((4 * len) + 2, GFP_KERNEL); 346 + if (ses->serverDomain != NULL) { 347 cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len, 348 nls_cp); 349 + cFYI(1, ("serverDomain=%s", ses->serverDomain)); 350 + } 351 data += 2 * (len + 1); 352 words_left -= len + 1; 353