Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
"A set of cifs cleanup fixes.

The only big one of this set optimizes the cifs error logging,
renaming cFYI and cERROR macros to cifs_dbg, and in the process makes
it clearer and reduces module size."

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
cifs: small variable name cleanup
CIFS: fix error return code in cifs_atomic_open()
cifs: store the real expected sequence number in the mid
cifs: on send failure, readjust server sequence number downward
cifs: remove ENOSPC handling in smb_sendv
[CIFS] cifs: Rename cERROR and cFYI to cifs_dbg
fs: cifs: use kmemdup instead of kmalloc + memcpy
cifs: replaced kmalloc + memset with kzalloc
cifs: ignore the unc= and prefixpath= mount options

+1261 -1304
+20 -20
fs/cifs/asn1.c
··· 506 506 507 507 /* GSSAPI header */ 508 508 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 509 - cFYI(1, "Error decoding negTokenInit header"); 509 + cifs_dbg(FYI, "Error decoding negTokenInit header\n"); 510 510 return 0; 511 511 } else if ((cls != ASN1_APL) || (con != ASN1_CON) 512 512 || (tag != ASN1_EOC)) { 513 - cFYI(1, "cls = %d con = %d tag = %d", cls, con, tag); 513 + cifs_dbg(FYI, "cls = %d con = %d tag = %d\n", cls, con, tag); 514 514 return 0; 515 515 } 516 516 ··· 531 531 532 532 /* SPNEGO OID not present or garbled -- bail out */ 533 533 if (!rc) { 534 - cFYI(1, "Error decoding negTokenInit header"); 534 + cifs_dbg(FYI, "Error decoding negTokenInit header\n"); 535 535 return 0; 536 536 } 537 537 538 538 /* SPNEGO */ 539 539 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 540 - cFYI(1, "Error decoding negTokenInit"); 540 + cifs_dbg(FYI, "Error decoding negTokenInit\n"); 541 541 return 0; 542 542 } else if ((cls != ASN1_CTX) || (con != ASN1_CON) 543 543 || (tag != ASN1_EOC)) { 544 - cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 0", 545 - cls, con, tag, end, *end); 544 + cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 0\n", 545 + cls, con, tag, end, *end); 546 546 return 0; 547 547 } 548 548 549 549 /* negTokenInit */ 550 550 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 551 - cFYI(1, "Error decoding negTokenInit"); 551 + cifs_dbg(FYI, "Error decoding negTokenInit\n"); 552 552 return 0; 553 553 } else if ((cls != ASN1_UNI) || (con != ASN1_CON) 554 554 || (tag != ASN1_SEQ)) { 555 - cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 1", 556 - cls, con, tag, end, *end); 555 + cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 1\n", 556 + cls, con, tag, end, *end); 557 557 return 0; 558 558 } 559 559 560 560 /* sequence */ 561 561 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 562 - cFYI(1, "Error decoding 2nd part of negTokenInit"); 562 + cifs_dbg(FYI, "Error decoding 2nd part of negTokenInit\n"); 563 563 return 0; 564 564 } else if ((cls != ASN1_CTX) || (con != ASN1_CON) 565 565 || (tag != ASN1_EOC)) { 566 - cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 0", 567 - cls, con, tag, end, *end); 566 + cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 0\n", 567 + cls, con, tag, end, *end); 568 568 return 0; 569 569 } 570 570 571 571 /* sequence of */ 572 572 if (asn1_header_decode 573 573 (&ctx, &sequence_end, &cls, &con, &tag) == 0) { 574 - cFYI(1, "Error decoding 2nd part of negTokenInit"); 574 + cifs_dbg(FYI, "Error decoding 2nd part of negTokenInit\n"); 575 575 return 0; 576 576 } else if ((cls != ASN1_UNI) || (con != ASN1_CON) 577 577 || (tag != ASN1_SEQ)) { 578 - cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 1", 579 - cls, con, tag, end, *end); 578 + cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 1\n", 579 + cls, con, tag, end, *end); 580 580 return 0; 581 581 } 582 582 ··· 584 584 while (!asn1_eoc_decode(&ctx, sequence_end)) { 585 585 rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag); 586 586 if (!rc) { 587 - cFYI(1, "Error decoding negTokenInit hdr exit2"); 587 + cifs_dbg(FYI, "Error decoding negTokenInit hdr exit2\n"); 588 588 return 0; 589 589 } 590 590 if ((tag == ASN1_OJI) && (con == ASN1_PRI)) { 591 591 if (asn1_oid_decode(&ctx, end, &oid, &oidlen)) { 592 592 593 - cFYI(1, "OID len = %d oid = 0x%lx 0x%lx " 594 - "0x%lx 0x%lx", oidlen, *oid, 595 - *(oid + 1), *(oid + 2), *(oid + 3)); 593 + cifs_dbg(FYI, "OID len = %d oid = 0x%lx 0x%lx 0x%lx 0x%lx\n", 594 + oidlen, *oid, *(oid + 1), *(oid + 2), 595 + *(oid + 3)); 596 596 597 597 if (compare_oid(oid, oidlen, MSKRB5_OID, 598 598 MSKRB5_OID_LEN)) ··· 610 610 kfree(oid); 611 611 } 612 612 } else { 613 - cFYI(1, "Should be an oid what is going on?"); 613 + cifs_dbg(FYI, "Should be an oid what is going on?\n"); 614 614 } 615 615 } 616 616
+3 -3
fs/cifs/cache.c
··· 92 92 break; 93 93 94 94 default: 95 - cERROR(1, "Unknown network family '%d'", sa->sa_family); 95 + cifs_dbg(VFS, "Unknown network family '%d'\n", sa->sa_family); 96 96 key_len = 0; 97 97 break; 98 98 } ··· 152 152 153 153 sharename = extract_sharename(tcon->treeName); 154 154 if (IS_ERR(sharename)) { 155 - cFYI(1, "%s: couldn't extract sharename", __func__); 155 + cifs_dbg(FYI, "%s: couldn't extract sharename\n", __func__); 156 156 sharename = NULL; 157 157 return 0; 158 158 } ··· 302 302 pagevec_init(&pvec, 0); 303 303 first = 0; 304 304 305 - cFYI(1, "%s: cifs inode 0x%p now uncached", __func__, cifsi); 305 + cifs_dbg(FYI, "%s: cifs inode 0x%p now uncached\n", __func__, cifsi); 306 306 307 307 for (;;) { 308 308 nr_pages = pagevec_lookup(&pvec,
+42 -25
fs/cifs/cifs_debug.c
··· 57 57 } 58 58 } 59 59 60 + #ifdef CONFIG_CIFS_DEBUG 61 + void cifs_vfs_err(const char *fmt, ...) 62 + { 63 + struct va_format vaf; 64 + va_list args; 65 + 66 + va_start(args, fmt); 67 + 68 + vaf.fmt = fmt; 69 + vaf.va = &args; 70 + 71 + printk(KERN_ERR "CIFS VFS: %pV", &vaf); 72 + 73 + va_end(args); 74 + } 75 + #endif 76 + 60 77 void cifs_dump_detail(void *buf) 61 78 { 62 79 #ifdef CONFIG_CIFS_DEBUG2 63 80 struct smb_hdr *smb = (struct smb_hdr *)buf; 64 81 65 - cERROR(1, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d", 66 - smb->Command, smb->Status.CifsError, 67 - smb->Flags, smb->Flags2, smb->Mid, smb->Pid); 68 - cERROR(1, "smb buf %p len %u", smb, smbCalcSize(smb)); 82 + cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d\n", 83 + smb->Command, smb->Status.CifsError, 84 + smb->Flags, smb->Flags2, smb->Mid, smb->Pid); 85 + cifs_dbg(VFS, "smb buf %p len %u\n", smb, smbCalcSize(smb)); 69 86 #endif /* CONFIG_CIFS_DEBUG2 */ 70 87 } 71 88 ··· 95 78 if (server == NULL) 96 79 return; 97 80 98 - cERROR(1, "Dump pending requests:"); 81 + cifs_dbg(VFS, "Dump pending requests:\n"); 99 82 spin_lock(&GlobalMid_Lock); 100 83 list_for_each(tmp, &server->pending_mid_q) { 101 84 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 102 - cERROR(1, "State: %d Cmd: %d Pid: %d Cbdata: %p Mid %llu", 103 - mid_entry->mid_state, 104 - le16_to_cpu(mid_entry->command), 105 - mid_entry->pid, 106 - mid_entry->callback_data, 107 - mid_entry->mid); 85 + cifs_dbg(VFS, "State: %d Cmd: %d Pid: %d Cbdata: %p Mid %llu\n", 86 + mid_entry->mid_state, 87 + le16_to_cpu(mid_entry->command), 88 + mid_entry->pid, 89 + mid_entry->callback_data, 90 + mid_entry->mid); 108 91 #ifdef CONFIG_CIFS_STATS2 109 - cERROR(1, "IsLarge: %d buf: %p time rcv: %ld now: %ld", 110 - mid_entry->large_buf, 111 - mid_entry->resp_buf, 112 - mid_entry->when_received, 113 - jiffies); 92 + cifs_dbg(VFS, "IsLarge: %d buf: %p time rcv: %ld now: %ld\n", 93 + mid_entry->large_buf, 94 + mid_entry->resp_buf, 95 + mid_entry->when_received, 96 + jiffies); 114 97 #endif /* STATS2 */ 115 - cERROR(1, "IsMult: %d IsEnd: %d", mid_entry->multiRsp, 116 - mid_entry->multiEnd); 98 + cifs_dbg(VFS, "IsMult: %d IsEnd: %d\n", 99 + mid_entry->multiRsp, mid_entry->multiEnd); 117 100 if (mid_entry->resp_buf) { 118 101 cifs_dump_detail(mid_entry->resp_buf); 119 102 cifs_dump_mem("existing buf: ", ··· 620 603 global_secflags = CIFSSEC_MAX; 621 604 return count; 622 605 } else if (!isdigit(c)) { 623 - cERROR(1, "invalid flag %c", c); 606 + cifs_dbg(VFS, "invalid flag %c\n", c); 624 607 return -EINVAL; 625 608 } 626 609 } ··· 628 611 629 612 flags = simple_strtoul(flags_string, NULL, 0); 630 613 631 - cFYI(1, "sec flags 0x%x", flags); 614 + cifs_dbg(FYI, "sec flags 0x%x\n", flags); 632 615 633 616 if (flags <= 0) { 634 - cERROR(1, "invalid security flags %s", flags_string); 617 + cifs_dbg(VFS, "invalid security flags %s\n", flags_string); 635 618 return -EINVAL; 636 619 } 637 620 638 621 if (flags & ~CIFSSEC_MASK) { 639 - cERROR(1, "attempt to set unsupported security flags 0x%x", 640 - flags & ~CIFSSEC_MASK); 622 + cifs_dbg(VFS, "attempt to set unsupported security flags 0x%x\n", 623 + flags & ~CIFSSEC_MASK); 641 624 return -EINVAL; 642 625 } 643 626 /* flags look ok - update the global security flags for cifs module */ ··· 645 628 if (global_secflags & CIFSSEC_MUST_SIGN) { 646 629 /* requiring signing implies signing is allowed */ 647 630 global_secflags |= CIFSSEC_MAY_SIGN; 648 - cFYI(1, "packet signing now required"); 631 + cifs_dbg(FYI, "packet signing now required\n"); 649 632 } else if ((global_secflags & CIFSSEC_MAY_SIGN) == 0) { 650 - cFYI(1, "packet signing disabled"); 633 + cifs_dbg(FYI, "packet signing disabled\n"); 651 634 } 652 635 /* BB should we turn on MAY flags for other MUST options? */ 653 636 return count;
+23 -47
fs/cifs/cifs_debug.h
··· 25 25 void cifs_dump_mem(char *label, void *data, int length); 26 26 void cifs_dump_detail(void *); 27 27 void cifs_dump_mids(struct TCP_Server_Info *); 28 - #ifdef CONFIG_CIFS_DEBUG2 29 - #define DBG2 2 30 - #else 31 - #define DBG2 0 32 - #endif 33 28 extern int traceSMB; /* flag which enables the function below */ 34 29 void dump_smb(void *, int); 35 30 #define CIFS_INFO 0x01 36 31 #define CIFS_RC 0x02 37 32 #define CIFS_TIMER 0x04 38 33 34 + #define VFS 1 35 + #define FYI 2 39 36 extern int cifsFYI; 37 + #ifdef CONFIG_CIFS_DEBUG2 38 + #define NOISY 4 39 + #else 40 + #define NOISY 0 41 + #endif 40 42 41 43 /* 42 44 * debug ON ··· 46 44 */ 47 45 #ifdef CONFIG_CIFS_DEBUG 48 46 47 + __printf(1, 2) void cifs_vfs_err(const char *fmt, ...); 48 + 49 49 /* information message: e.g., configuration, major event */ 50 - #define cifsfyi(fmt, ...) \ 50 + #define cifs_dbg(type, fmt, ...) \ 51 51 do { \ 52 - if (cifsFYI & CIFS_INFO) \ 53 - printk(KERN_DEBUG "%s: " fmt "\n", \ 54 - __FILE__, ##__VA_ARGS__); \ 55 - } while (0) 56 - 57 - #define cFYI(set, fmt, ...) \ 58 - do { \ 59 - if (set) \ 60 - cifsfyi(fmt, ##__VA_ARGS__); \ 61 - } while (0) 62 - 63 - #define cifswarn(fmt, ...) \ 64 - printk(KERN_WARNING fmt "\n", ##__VA_ARGS__) 65 - 66 - /* error event message: e.g., i/o error */ 67 - #define cifserror(fmt, ...) \ 68 - printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__); \ 69 - 70 - #define cERROR(set, fmt, ...) \ 71 - do { \ 72 - if (set) \ 73 - cifserror(fmt, ##__VA_ARGS__); \ 52 + if (type == FYI) { \ 53 + if (cifsFYI & CIFS_INFO) { \ 54 + printk(KERN_DEBUG "%s: " fmt, \ 55 + __FILE__, ##__VA_ARGS__); \ 56 + } \ 57 + } else if (type == VFS) { \ 58 + cifs_vfs_err(fmt, ##__VA_ARGS__); \ 59 + } else if (type == NOISY && type != 0) { \ 60 + printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ 61 + } \ 74 62 } while (0) 75 63 76 64 /* ··· 68 76 * --------- 69 77 */ 70 78 #else /* _CIFS_DEBUG */ 71 - #define cifsfyi(fmt, ...) \ 79 + #define cifs_dbg(type, fmt, ...) \ 72 80 do { \ 73 81 if (0) \ 74 - printk(KERN_DEBUG "%s: " fmt "\n", \ 75 - __FILE__, ##__VA_ARGS__); \ 82 + printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ 76 83 } while (0) 77 - #define cFYI(set, fmt, ...) \ 78 - do { \ 79 - if (0 && set) \ 80 - cifsfyi(fmt, ##__VA_ARGS__); \ 81 - } while (0) 82 - #define cifserror(fmt, ...) \ 83 - do { \ 84 - if (0) \ 85 - printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__); \ 86 - } while (0) 87 - #define cERROR(set, fmt, ...) \ 88 - do { \ 89 - if (0 && set) \ 90 - cifserror(fmt, ##__VA_ARGS__); \ 91 - } while (0) 92 - #endif /* _CIFS_DEBUG */ 84 + #endif 93 85 94 86 #endif /* _H_CIFS_DEBUG */
+21 -20
fs/cifs/cifs_dfs_ref.c
··· 84 84 /* find server name end */ 85 85 pSep = memchr(UNC+2, '\\', len-2); 86 86 if (!pSep) { 87 - cERROR(1, "%s: no server name end in node name: %s", 88 - __func__, node_name); 87 + cifs_dbg(VFS, "%s: no server name end in node name: %s\n", 88 + __func__, node_name); 89 89 kfree(UNC); 90 90 return ERR_PTR(-EINVAL); 91 91 } ··· 141 141 142 142 rc = dns_resolve_server_name_to_ip(*devname, &srvIP); 143 143 if (rc < 0) { 144 - cFYI(1, "%s: Failed to resolve server part of %s to IP: %d", 145 - __func__, *devname, rc); 144 + cifs_dbg(FYI, "%s: Failed to resolve server part of %s to IP: %d\n", 145 + __func__, *devname, rc); 146 146 goto compose_mount_options_err; 147 147 } 148 148 ··· 216 216 strcat(mountdata, fullpath + ref->path_consumed); 217 217 } 218 218 219 - /*cFYI(1, "%s: parent mountdata: %s", __func__,sb_mountdata);*/ 220 - /*cFYI(1, "%s: submount mountdata: %s", __func__, mountdata );*/ 219 + /*cifs_dbg(FYI, "%s: parent mountdata: %s\n", __func__, sb_mountdata);*/ 220 + /*cifs_dbg(FYI, "%s: submount mountdata: %s\n", __func__, mountdata );*/ 221 221 222 222 compose_mount_options_out: 223 223 kfree(srvIP); ··· 260 260 261 261 static void dump_referral(const struct dfs_info3_param *ref) 262 262 { 263 - cFYI(1, "DFS: ref path: %s", ref->path_name); 264 - cFYI(1, "DFS: node path: %s", ref->node_name); 265 - cFYI(1, "DFS: fl: %hd, srv_type: %hd", ref->flags, ref->server_type); 266 - cFYI(1, "DFS: ref_flags: %hd, path_consumed: %hd", ref->ref_flag, 267 - ref->path_consumed); 263 + cifs_dbg(FYI, "DFS: ref path: %s\n", ref->path_name); 264 + cifs_dbg(FYI, "DFS: node path: %s\n", ref->node_name); 265 + cifs_dbg(FYI, "DFS: fl: %hd, srv_type: %hd\n", 266 + ref->flags, ref->server_type); 267 + cifs_dbg(FYI, "DFS: ref_flags: %hd, path_consumed: %hd\n", 268 + ref->ref_flag, ref->path_consumed); 268 269 } 269 270 270 271 /* ··· 284 283 struct vfsmount *mnt; 285 284 struct tcon_link *tlink; 286 285 287 - cFYI(1, "in %s", __func__); 286 + cifs_dbg(FYI, "in %s\n", __func__); 288 287 BUG_ON(IS_ROOT(mntpt)); 289 288 290 289 /* ··· 321 320 /* connect to a node */ 322 321 len = strlen(referrals[i].node_name); 323 322 if (len < 2) { 324 - cERROR(1, "%s: Net Address path too short: %s", 325 - __func__, referrals[i].node_name); 323 + cifs_dbg(VFS, "%s: Net Address path too short: %s\n", 324 + __func__, referrals[i].node_name); 326 325 mnt = ERR_PTR(-EINVAL); 327 326 break; 328 327 } 329 328 mnt = cifs_dfs_do_refmount(cifs_sb, 330 329 full_path, referrals + i); 331 - cFYI(1, "%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__, 332 - referrals[i].node_name, mnt); 330 + cifs_dbg(FYI, "%s: cifs_dfs_do_refmount:%s , mnt:%p\n", 331 + __func__, referrals[i].node_name, mnt); 333 332 if (!IS_ERR(mnt)) 334 333 goto success; 335 334 } ··· 344 343 free_full_path: 345 344 kfree(full_path); 346 345 cdda_exit: 347 - cFYI(1, "leaving %s" , __func__); 346 + cifs_dbg(FYI, "leaving %s\n" , __func__); 348 347 return mnt; 349 348 } 350 349 ··· 355 354 { 356 355 struct vfsmount *newmnt; 357 356 358 - cFYI(1, "in %s", __func__); 357 + cifs_dbg(FYI, "in %s\n", __func__); 359 358 360 359 newmnt = cifs_dfs_do_automount(path->dentry); 361 360 if (IS_ERR(newmnt)) { 362 - cFYI(1, "leaving %s [automount failed]" , __func__); 361 + cifs_dbg(FYI, "leaving %s [automount failed]\n" , __func__); 363 362 return newmnt; 364 363 } 365 364 ··· 367 366 mnt_set_expiry(newmnt, &cifs_dfs_automount_list); 368 367 schedule_delayed_work(&cifs_dfs_automount_task, 369 368 cifs_dfs_mountpoint_expiry_timeout); 370 - cFYI(1, "leaving %s [ok]" , __func__); 369 + cifs_dbg(FYI, "leaving %s [ok]\n" , __func__); 371 370 return newmnt; 372 371 } 373 372
+2 -3
fs/cifs/cifs_spnego.c
··· 37 37 int ret; 38 38 39 39 ret = -ENOMEM; 40 - payload = kmalloc(prep->datalen, GFP_KERNEL); 40 + payload = kmemdup(prep->data, prep->datalen, GFP_KERNEL); 41 41 if (!payload) 42 42 goto error; 43 43 44 44 /* attach the data */ 45 - memcpy(payload, prep->data, prep->datalen); 46 45 key->payload.data = payload; 47 46 ret = 0; 48 47 ··· 163 164 dp = description + strlen(description); 164 165 sprintf(dp, ";pid=0x%x", current->pid); 165 166 166 - cFYI(1, "key description = %s", description); 167 + cifs_dbg(FYI, "key description = %s\n", description); 167 168 spnego_key = request_key(&cifs_spnego_key_type, description, ""); 168 169 169 170 #ifdef CONFIG_CIFS_DEBUG2
+2 -2
fs/cifs/cifs_unicode.c
··· 227 227 for (i = 0; len && *from; i++, from += charlen, len -= charlen) { 228 228 charlen = codepage->char2uni(from, len, &wchar_to); 229 229 if (charlen < 1) { 230 - cERROR(1, "strtoUTF16: char2uni of 0x%x returned %d", 231 - *from, charlen); 230 + cifs_dbg(VFS, "strtoUTF16: char2uni of 0x%x returned %d\n", 231 + *from, charlen); 232 232 /* A question mark */ 233 233 wchar_to = 0x003f; 234 234 charlen = 1;
+65 -65
fs/cifs/cifsacl.c
··· 63 63 key->datalen = prep->datalen; 64 64 return 0; 65 65 } 66 - payload = kmalloc(prep->datalen, GFP_KERNEL); 66 + payload = kmemdup(prep->data, prep->datalen, GFP_KERNEL); 67 67 if (!payload) 68 68 return -ENOMEM; 69 69 70 - memcpy(payload, prep->data, prep->datalen); 71 70 key->payload.data = payload; 72 71 key->datalen = prep->datalen; 73 72 return 0; ··· 218 219 sidkey = request_key(&cifs_idmap_key_type, desc, ""); 219 220 if (IS_ERR(sidkey)) { 220 221 rc = -EINVAL; 221 - cFYI(1, "%s: Can't map %cid %u to a SID", __func__, 222 - sidtype == SIDOWNER ? 'u' : 'g', cid); 222 + cifs_dbg(FYI, "%s: Can't map %cid %u to a SID\n", 223 + __func__, sidtype == SIDOWNER ? 'u' : 'g', cid); 223 224 goto out_revert_creds; 224 225 } else if (sidkey->datalen < CIFS_SID_BASE_SIZE) { 225 226 rc = -EIO; 226 - cFYI(1, "%s: Downcall contained malformed key " 227 - "(datalen=%hu)", __func__, sidkey->datalen); 227 + cifs_dbg(FYI, "%s: Downcall contained malformed key (datalen=%hu)\n", 228 + __func__, sidkey->datalen); 228 229 goto invalidate_key; 229 230 } 230 231 ··· 240 241 ksid_size = CIFS_SID_BASE_SIZE + (ksid->num_subauth * sizeof(__le32)); 241 242 if (ksid_size > sidkey->datalen) { 242 243 rc = -EIO; 243 - cFYI(1, "%s: Downcall contained malformed key (datalen=%hu, " 244 - "ksid_size=%u)", __func__, sidkey->datalen, ksid_size); 244 + cifs_dbg(FYI, "%s: Downcall contained malformed key (datalen=%hu, ksid_size=%u)\n", 245 + __func__, sidkey->datalen, ksid_size); 245 246 goto invalidate_key; 246 247 } 247 248 ··· 273 274 * Just return an error. 274 275 */ 275 276 if (unlikely(psid->num_subauth > SID_MAX_SUB_AUTHORITIES)) { 276 - cFYI(1, "%s: %u subauthorities is too many!", __func__, 277 - psid->num_subauth); 277 + cifs_dbg(FYI, "%s: %u subauthorities is too many!\n", 278 + __func__, psid->num_subauth); 278 279 return -EIO; 279 280 } 280 281 ··· 286 287 sidkey = request_key(&cifs_idmap_key_type, sidstr, ""); 287 288 if (IS_ERR(sidkey)) { 288 289 rc = -EINVAL; 289 - cFYI(1, "%s: Can't map SID %s to a %cid", __func__, sidstr, 290 - sidtype == SIDOWNER ? 'u' : 'g'); 290 + cifs_dbg(FYI, "%s: Can't map SID %s to a %cid\n", 291 + __func__, sidstr, sidtype == SIDOWNER ? 'u' : 'g'); 291 292 goto out_revert_creds; 292 293 } 293 294 ··· 299 300 BUILD_BUG_ON(sizeof(uid_t) != sizeof(gid_t)); 300 301 if (sidkey->datalen != sizeof(uid_t)) { 301 302 rc = -EIO; 302 - cFYI(1, "%s: Downcall contained malformed key " 303 - "(datalen=%hu)", __func__, sidkey->datalen); 303 + cifs_dbg(FYI, "%s: Downcall contained malformed key (datalen=%hu)\n", 304 + __func__, sidkey->datalen); 304 305 key_invalidate(sidkey); 305 306 goto out_key_put; 306 307 } ··· 345 346 struct key *keyring; 346 347 int ret; 347 348 348 - cFYI(1, "Registering the %s key type", cifs_idmap_key_type.name); 349 + cifs_dbg(FYI, "Registering the %s key type\n", 350 + cifs_idmap_key_type.name); 349 351 350 352 /* create an override credential set with a special thread keyring in 351 353 * which requests are cached ··· 379 379 cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; 380 380 root_cred = cred; 381 381 382 - cFYI(1, "cifs idmap keyring: %d", key_serial(keyring)); 382 + cifs_dbg(FYI, "cifs idmap keyring: %d\n", key_serial(keyring)); 383 383 return 0; 384 384 385 385 failed_put_key: ··· 395 395 key_revoke(root_cred->thread_keyring); 396 396 unregister_key_type(&cifs_idmap_key_type); 397 397 put_cred(root_cred); 398 - cFYI(1, "Unregistered %s key type", cifs_idmap_key_type.name); 398 + cifs_dbg(FYI, "Unregistered %s key type\n", cifs_idmap_key_type.name); 399 399 } 400 400 401 401 /* copy ntsd, owner sid, and group sid from a security descriptor to another */ ··· 462 462 *pbits_to_set &= ~S_IXUGO; 463 463 return; 464 464 } else if (type != ACCESS_ALLOWED) { 465 - cERROR(1, "unknown access control type %d", type); 465 + cifs_dbg(VFS, "unknown access control type %d\n", type); 466 466 return; 467 467 } 468 468 /* else ACCESS_ALLOWED type */ 469 469 470 470 if (flags & GENERIC_ALL) { 471 471 *pmode |= (S_IRWXUGO & (*pbits_to_set)); 472 - cFYI(DBG2, "all perms"); 472 + cifs_dbg(NOISY, "all perms\n"); 473 473 return; 474 474 } 475 475 if ((flags & GENERIC_WRITE) || ··· 482 482 ((flags & FILE_EXEC_RIGHTS) == FILE_EXEC_RIGHTS)) 483 483 *pmode |= (S_IXUGO & (*pbits_to_set)); 484 484 485 - cFYI(DBG2, "access flags 0x%x mode now 0x%x", flags, *pmode); 485 + cifs_dbg(NOISY, "access flags 0x%x mode now 0x%x\n", flags, *pmode); 486 486 return; 487 487 } 488 488 ··· 511 511 if (mode & S_IXUGO) 512 512 *pace_flags |= SET_FILE_EXEC_RIGHTS; 513 513 514 - cFYI(DBG2, "mode: 0x%x, access flags now 0x%x", mode, *pace_flags); 514 + cifs_dbg(NOISY, "mode: 0x%x, access flags now 0x%x\n", 515 + mode, *pace_flags); 515 516 return; 516 517 } 517 518 ··· 552 551 /* validate that we do not go past end of acl */ 553 552 554 553 if (le16_to_cpu(pace->size) < 16) { 555 - cERROR(1, "ACE too small %d", le16_to_cpu(pace->size)); 554 + cifs_dbg(VFS, "ACE too small %d\n", le16_to_cpu(pace->size)); 556 555 return; 557 556 } 558 557 559 558 if (end_of_acl < (char *)pace + le16_to_cpu(pace->size)) { 560 - cERROR(1, "ACL too small to parse ACE"); 559 + cifs_dbg(VFS, "ACL too small to parse ACE\n"); 561 560 return; 562 561 } 563 562 564 563 num_subauth = pace->sid.num_subauth; 565 564 if (num_subauth) { 566 565 int i; 567 - cFYI(1, "ACE revision %d num_auth %d type %d flags %d size %d", 568 - pace->sid.revision, pace->sid.num_subauth, pace->type, 569 - pace->flags, le16_to_cpu(pace->size)); 566 + cifs_dbg(FYI, "ACE revision %d num_auth %d type %d flags %d size %d\n", 567 + pace->sid.revision, pace->sid.num_subauth, pace->type, 568 + pace->flags, le16_to_cpu(pace->size)); 570 569 for (i = 0; i < num_subauth; ++i) { 571 - cFYI(1, "ACE sub_auth[%d]: 0x%x", i, 572 - le32_to_cpu(pace->sid.sub_auth[i])); 570 + cifs_dbg(FYI, "ACE sub_auth[%d]: 0x%x\n", 571 + i, le32_to_cpu(pace->sid.sub_auth[i])); 573 572 } 574 573 575 574 /* BB add length check to make sure that we do not have huge ··· 602 601 603 602 /* validate that we do not go past end of acl */ 604 603 if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) { 605 - cERROR(1, "ACL too small to parse DACL"); 604 + cifs_dbg(VFS, "ACL too small to parse DACL\n"); 606 605 return; 607 606 } 608 607 609 - cFYI(DBG2, "DACL revision %d size %d num aces %d", 610 - le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size), 611 - le32_to_cpu(pdacl->num_aces)); 608 + cifs_dbg(NOISY, "DACL revision %d size %d num aces %d\n", 609 + le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size), 610 + le32_to_cpu(pdacl->num_aces)); 612 611 613 612 /* reset rwx permissions for user/group/other. 614 613 Also, if num_aces is 0 i.e. DACL has no ACEs, ··· 628 627 return; 629 628 ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), 630 629 GFP_KERNEL); 631 - if (!ppace) { 632 - cERROR(1, "DACL memory allocation error"); 630 + if (!ppace) 633 631 return; 634 - } 635 632 636 633 for (i = 0; i < num_aces; ++i) { 637 634 ppace[i] = (struct cifs_ace *) (acl_base + acl_size); ··· 702 703 /* validate that we do not go past end of ACL - sid must be at least 8 703 704 bytes long (assuming no sub-auths - e.g. the null SID */ 704 705 if (end_of_acl < (char *)psid + 8) { 705 - cERROR(1, "ACL too small to parse SID %p", psid); 706 + cifs_dbg(VFS, "ACL too small to parse SID %p\n", psid); 706 707 return -EINVAL; 707 708 } 708 709 709 710 #ifdef CONFIG_CIFS_DEBUG2 710 711 if (psid->num_subauth) { 711 712 int i; 712 - cFYI(1, "SID revision %d num_auth %d", 713 - psid->revision, psid->num_subauth); 713 + cifs_dbg(FYI, "SID revision %d num_auth %d\n", 714 + psid->revision, psid->num_subauth); 714 715 715 716 for (i = 0; i < psid->num_subauth; i++) { 716 - cFYI(1, "SID sub_auth[%d]: 0x%x ", i, 717 - le32_to_cpu(psid->sub_auth[i])); 717 + cifs_dbg(FYI, "SID sub_auth[%d]: 0x%x\n", 718 + i, le32_to_cpu(psid->sub_auth[i])); 718 719 } 719 720 720 721 /* BB add length check to make sure that we do not have huge 721 722 num auths and therefore go off the end */ 722 - cFYI(1, "RID 0x%x", 723 - le32_to_cpu(psid->sub_auth[psid->num_subauth-1])); 723 + cifs_dbg(FYI, "RID 0x%x\n", 724 + le32_to_cpu(psid->sub_auth[psid->num_subauth-1])); 724 725 } 725 726 #endif 726 727 ··· 747 748 le32_to_cpu(pntsd->gsidoffset)); 748 749 dacloffset = le32_to_cpu(pntsd->dacloffset); 749 750 dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset); 750 - cFYI(DBG2, "revision %d type 0x%x ooffset 0x%x goffset 0x%x " 751 - "sacloffset 0x%x dacloffset 0x%x", 751 + cifs_dbg(NOISY, "revision %d type 0x%x ooffset 0x%x goffset 0x%x sacloffset 0x%x dacloffset 0x%x\n", 752 752 pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), 753 753 le32_to_cpu(pntsd->gsidoffset), 754 754 le32_to_cpu(pntsd->sacloffset), dacloffset); 755 755 /* cifs_dump_mem("owner_sid: ", owner_sid_ptr, 64); */ 756 756 rc = parse_sid(owner_sid_ptr, end_of_acl); 757 757 if (rc) { 758 - cFYI(1, "%s: Error %d parsing Owner SID", __func__, rc); 758 + cifs_dbg(FYI, "%s: Error %d parsing Owner SID\n", __func__, rc); 759 759 return rc; 760 760 } 761 761 rc = sid_to_id(cifs_sb, owner_sid_ptr, fattr, SIDOWNER); 762 762 if (rc) { 763 - cFYI(1, "%s: Error %d mapping Owner SID to uid", __func__, rc); 763 + cifs_dbg(FYI, "%s: Error %d mapping Owner SID to uid\n", 764 + __func__, rc); 764 765 return rc; 765 766 } 766 767 767 768 rc = parse_sid(group_sid_ptr, end_of_acl); 768 769 if (rc) { 769 - cFYI(1, "%s: Error %d mapping Owner SID to gid", __func__, rc); 770 + cifs_dbg(FYI, "%s: Error %d mapping Owner SID to gid\n", 771 + __func__, rc); 770 772 return rc; 771 773 } 772 774 rc = sid_to_id(cifs_sb, group_sid_ptr, fattr, SIDGROUP); 773 775 if (rc) { 774 - cFYI(1, "%s: Error %d mapping Group SID to gid", __func__, rc); 776 + cifs_dbg(FYI, "%s: Error %d mapping Group SID to gid\n", 777 + __func__, rc); 775 778 return rc; 776 779 } 777 780 ··· 781 780 parse_dacl(dacl_ptr, end_of_acl, owner_sid_ptr, 782 781 group_sid_ptr, fattr); 783 782 else 784 - cFYI(1, "no ACL"); /* BB grant all or default perms? */ 783 + cifs_dbg(FYI, "no ACL\n"); /* BB grant all or default perms? */ 785 784 786 785 return rc; 787 786 } ··· 831 830 id = from_kuid(&init_user_ns, uid); 832 831 rc = id_to_sid(id, SIDOWNER, nowner_sid_ptr); 833 832 if (rc) { 834 - cFYI(1, "%s: Mapping error %d for owner id %d", 835 - __func__, rc, id); 833 + cifs_dbg(FYI, "%s: Mapping error %d for owner id %d\n", 834 + __func__, rc, id); 836 835 kfree(nowner_sid_ptr); 837 836 return rc; 838 837 } ··· 851 850 id = from_kgid(&init_user_ns, gid); 852 851 rc = id_to_sid(id, SIDGROUP, ngroup_sid_ptr); 853 852 if (rc) { 854 - cFYI(1, "%s: Mapping error %d for group id %d", 855 - __func__, rc, id); 853 + cifs_dbg(FYI, "%s: Mapping error %d for group id %d\n", 854 + __func__, rc, id); 856 855 kfree(ngroup_sid_ptr); 857 856 return rc; 858 857 } ··· 882 881 883 882 cifs_put_tlink(tlink); 884 883 885 - cFYI(1, "%s: rc = %d ACL len %d", __func__, rc, *pacllen); 884 + cifs_dbg(FYI, "%s: rc = %d ACL len %d\n", __func__, rc, *pacllen); 886 885 if (rc) 887 886 return ERR_PTR(rc); 888 887 return pntsd; ··· 919 918 cifs_put_tlink(tlink); 920 919 free_xid(xid); 921 920 922 - cFYI(1, "%s: rc = %d ACL len %d", __func__, rc, *pacllen); 921 + cifs_dbg(FYI, "%s: rc = %d ACL len %d\n", __func__, rc, *pacllen); 923 922 if (rc) 924 923 return ERR_PTR(rc); 925 924 return pntsd; ··· 973 972 create_options, &fid, &oplock, NULL, cifs_sb->local_nls, 974 973 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 975 974 if (rc) { 976 - cERROR(1, "Unable to open file to set ACL"); 975 + cifs_dbg(VFS, "Unable to open file to set ACL\n"); 977 976 goto out; 978 977 } 979 978 980 979 rc = CIFSSMBSetCIFSACL(xid, tcon, fid, pnntsd, acllen, aclflag); 981 - cFYI(DBG2, "SetCIFSACL rc = %d", rc); 980 + cifs_dbg(NOISY, "SetCIFSACL rc = %d\n", rc); 982 981 983 982 CIFSSMBClose(xid, tcon, fid); 984 983 out: ··· 996 995 u32 acllen = 0; 997 996 int rc = 0; 998 997 999 - cFYI(DBG2, "converting ACL to mode for %s", path); 998 + cifs_dbg(NOISY, "converting ACL to mode for %s\n", path); 1000 999 1001 1000 if (pfid) 1002 1001 pntsd = get_cifs_acl_by_fid(cifs_sb, *pfid, &acllen); ··· 1006 1005 /* if we can retrieve the ACL, now parse Access Control Entries, ACEs */ 1007 1006 if (IS_ERR(pntsd)) { 1008 1007 rc = PTR_ERR(pntsd); 1009 - cERROR(1, "%s: error %d getting sec desc", __func__, rc); 1008 + cifs_dbg(VFS, "%s: error %d getting sec desc\n", __func__, rc); 1010 1009 } else { 1011 1010 rc = parse_sec_desc(cifs_sb, pntsd, acllen, fattr); 1012 1011 kfree(pntsd); 1013 1012 if (rc) 1014 - cERROR(1, "parse sec desc failed rc = %d", rc); 1013 + cifs_dbg(VFS, "parse sec desc failed rc = %d\n", rc); 1015 1014 } 1016 1015 1017 1016 return rc; ··· 1028 1027 struct cifs_ntsd *pntsd = NULL; /* acl obtained from server */ 1029 1028 struct cifs_ntsd *pnntsd = NULL; /* modified acl to be sent to server */ 1030 1029 1031 - cFYI(DBG2, "set ACL from mode for %s", path); 1030 + cifs_dbg(NOISY, "set ACL from mode for %s\n", path); 1032 1031 1033 1032 /* Get the security descriptor */ 1034 1033 pntsd = get_cifs_acl(CIFS_SB(inode->i_sb), inode, path, &secdesclen); 1035 1034 if (IS_ERR(pntsd)) { 1036 1035 rc = PTR_ERR(pntsd); 1037 - cERROR(1, "%s: error %d getting sec desc", __func__, rc); 1036 + cifs_dbg(VFS, "%s: error %d getting sec desc\n", __func__, rc); 1038 1037 goto out; 1039 1038 } 1040 1039 ··· 1047 1046 secdesclen = max_t(u32, secdesclen, DEFAULT_SEC_DESC_LEN); 1048 1047 pnntsd = kmalloc(secdesclen, GFP_KERNEL); 1049 1048 if (!pnntsd) { 1050 - cERROR(1, "Unable to allocate security descriptor"); 1051 1049 kfree(pntsd); 1052 1050 return -ENOMEM; 1053 1051 } ··· 1054 1054 rc = build_sec_desc(pntsd, pnntsd, secdesclen, nmode, uid, gid, 1055 1055 &aclflag); 1056 1056 1057 - cFYI(DBG2, "build_sec_desc rc: %d", rc); 1057 + cifs_dbg(NOISY, "build_sec_desc rc: %d\n", rc); 1058 1058 1059 1059 if (!rc) { 1060 1060 /* Set the security descriptor */ 1061 1061 rc = set_cifs_acl(pnntsd, secdesclen, inode, path, aclflag); 1062 - cFYI(DBG2, "set_cifs_acl rc: %d", rc); 1062 + cifs_dbg(NOISY, "set_cifs_acl rc: %d\n", rc); 1063 1063 } 1064 1064 1065 1065 kfree(pnntsd);
+51 -55
fs/cifs/cifsencrypt.c
··· 50 50 return -EINVAL; 51 51 52 52 if (!server->secmech.sdescmd5) { 53 - cERROR(1, "%s: Can't generate signature", __func__); 53 + cifs_dbg(VFS, "%s: Can't generate signature\n", __func__); 54 54 return -1; 55 55 } 56 56 57 57 rc = crypto_shash_init(&server->secmech.sdescmd5->shash); 58 58 if (rc) { 59 - cERROR(1, "%s: Could not init md5", __func__); 59 + cifs_dbg(VFS, "%s: Could not init md5\n", __func__); 60 60 return rc; 61 61 } 62 62 63 63 rc = crypto_shash_update(&server->secmech.sdescmd5->shash, 64 64 server->session_key.response, server->session_key.len); 65 65 if (rc) { 66 - cERROR(1, "%s: Could not update with response", __func__); 66 + cifs_dbg(VFS, "%s: Could not update with response\n", __func__); 67 67 return rc; 68 68 } 69 69 ··· 71 71 if (iov[i].iov_len == 0) 72 72 continue; 73 73 if (iov[i].iov_base == NULL) { 74 - cERROR(1, "null iovec entry"); 74 + cifs_dbg(VFS, "null iovec entry\n"); 75 75 return -EIO; 76 76 } 77 77 /* The first entry includes a length field (which does not get ··· 88 88 iov[i].iov_base, iov[i].iov_len); 89 89 } 90 90 if (rc) { 91 - cERROR(1, "%s: Could not update with payload", 92 - __func__); 91 + cifs_dbg(VFS, "%s: Could not update with payload\n", 92 + __func__); 93 93 return rc; 94 94 } 95 95 } ··· 106 106 107 107 rc = crypto_shash_final(&server->secmech.sdescmd5->shash, signature); 108 108 if (rc) 109 - cERROR(1, "%s: Could not generate md5 hash", __func__); 109 + cifs_dbg(VFS, "%s: Could not generate md5 hash\n", __func__); 110 110 111 111 return rc; 112 112 } ··· 135 135 cpu_to_le32(server->sequence_number); 136 136 cifs_pdu->Signature.Sequence.Reserved = 0; 137 137 138 - *pexpected_response_sequence_number = server->sequence_number++; 139 - server->sequence_number++; 138 + *pexpected_response_sequence_number = ++server->sequence_number; 139 + ++server->sequence_number; 140 140 141 141 rc = cifs_calc_signature(rqst, server, smb_signature); 142 142 if (rc) ··· 196 196 197 197 /* Do not need to verify session setups with signature "BSRSPYL " */ 198 198 if (memcmp(cifs_pdu->Signature.SecuritySignature, "BSRSPYL ", 8) == 0) 199 - cFYI(1, "dummy signature received for smb command 0x%x", 200 - cifs_pdu->Command); 199 + cifs_dbg(FYI, "dummy signature received for smb command 0x%x\n", 200 + cifs_pdu->Command); 201 201 202 202 /* save off the origiginal signature so we can modify the smb and check 203 203 its signature against what the server sent */ ··· 235 235 return -EINVAL; 236 236 237 237 ses->auth_key.response = kmalloc(temp_len, GFP_KERNEL); 238 - if (!ses->auth_key.response) { 239 - cERROR(1, "NTLM can't allocate (%u bytes) memory", temp_len); 238 + if (!ses->auth_key.response) 240 239 return -ENOMEM; 241 - } 240 + 242 241 ses->auth_key.len = temp_len; 243 242 244 243 rc = SMBNTencrypt(ses->password, ses->server->cryptkey, 245 244 ses->auth_key.response + CIFS_SESS_KEY_SIZE, nls_cp); 246 245 if (rc) { 247 - cFYI(1, "%s Can't generate NTLM response, error: %d", 248 - __func__, rc); 246 + cifs_dbg(FYI, "%s Can't generate NTLM response, error: %d\n", 247 + __func__, rc); 249 248 return rc; 250 249 } 251 250 252 251 rc = E_md4hash(ses->password, temp_key, nls_cp); 253 252 if (rc) { 254 - cFYI(1, "%s Can't generate NT hash, error: %d", __func__, rc); 253 + cifs_dbg(FYI, "%s Can't generate NT hash, error: %d\n", 254 + __func__, rc); 255 255 return rc; 256 256 } 257 257 258 258 rc = mdfour(ses->auth_key.response, temp_key, CIFS_SESS_KEY_SIZE); 259 259 if (rc) 260 - cFYI(1, "%s Can't generate NTLM session key, error: %d", 261 - __func__, rc); 260 + cifs_dbg(FYI, "%s Can't generate NTLM session key, error: %d\n", 261 + __func__, rc); 262 262 263 263 return rc; 264 264 } ··· 334 334 ses->auth_key.response = kzalloc(ses->auth_key.len, GFP_KERNEL); 335 335 if (!ses->auth_key.response) { 336 336 ses->auth_key.len = 0; 337 - cERROR(1, "Challenge target info allocation failure"); 338 337 return -ENOMEM; 339 338 } 340 339 ··· 419 420 wchar_t *server; 420 421 421 422 if (!ses->server->secmech.sdeschmacmd5) { 422 - cERROR(1, "calc_ntlmv2_hash: can't generate ntlmv2 hash"); 423 + cifs_dbg(VFS, "%s: can't generate ntlmv2 hash\n", __func__); 423 424 return -1; 424 425 } 425 426 ··· 429 430 rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, nt_hash, 430 431 CIFS_NTHASH_SIZE); 431 432 if (rc) { 432 - cERROR(1, "%s: Could not set NT Hash as a key", __func__); 433 + cifs_dbg(VFS, "%s: Could not set NT Hash as a key\n", __func__); 433 434 return rc; 434 435 } 435 436 436 437 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); 437 438 if (rc) { 438 - cERROR(1, "calc_ntlmv2_hash: could not init hmacmd5"); 439 + cifs_dbg(VFS, "%s: could not init hmacmd5\n", __func__); 439 440 return rc; 440 441 } 441 442 ··· 443 444 len = ses->user_name ? strlen(ses->user_name) : 0; 444 445 user = kmalloc(2 + (len * 2), GFP_KERNEL); 445 446 if (user == NULL) { 446 - cERROR(1, "calc_ntlmv2_hash: user mem alloc failure"); 447 447 rc = -ENOMEM; 448 448 return rc; 449 449 } ··· 458 460 (char *)user, 2 * len); 459 461 kfree(user); 460 462 if (rc) { 461 - cERROR(1, "%s: Could not update with user", __func__); 463 + cifs_dbg(VFS, "%s: Could not update with user\n", __func__); 462 464 return rc; 463 465 } 464 466 ··· 468 470 469 471 domain = kmalloc(2 + (len * 2), GFP_KERNEL); 470 472 if (domain == NULL) { 471 - cERROR(1, "calc_ntlmv2_hash: domain mem alloc failure"); 472 473 rc = -ENOMEM; 473 474 return rc; 474 475 } ··· 478 481 (char *)domain, 2 * len); 479 482 kfree(domain); 480 483 if (rc) { 481 - cERROR(1, "%s: Could not update with domain", 482 - __func__); 484 + cifs_dbg(VFS, "%s: Could not update with domain\n", 485 + __func__); 483 486 return rc; 484 487 } 485 488 } else if (ses->serverName) { ··· 487 490 488 491 server = kmalloc(2 + (len * 2), GFP_KERNEL); 489 492 if (server == NULL) { 490 - cERROR(1, "calc_ntlmv2_hash: server mem alloc failure"); 491 493 rc = -ENOMEM; 492 494 return rc; 493 495 } ··· 497 501 (char *)server, 2 * len); 498 502 kfree(server); 499 503 if (rc) { 500 - cERROR(1, "%s: Could not update with server", 501 - __func__); 504 + cifs_dbg(VFS, "%s: Could not update with server\n", 505 + __func__); 502 506 return rc; 503 507 } 504 508 } ··· 506 510 rc = crypto_shash_final(&ses->server->secmech.sdeschmacmd5->shash, 507 511 ntlmv2_hash); 508 512 if (rc) 509 - cERROR(1, "%s: Could not generate md5 hash", __func__); 513 + cifs_dbg(VFS, "%s: Could not generate md5 hash\n", __func__); 510 514 511 515 return rc; 512 516 } ··· 518 522 unsigned int offset = CIFS_SESS_KEY_SIZE + 8; 519 523 520 524 if (!ses->server->secmech.sdeschmacmd5) { 521 - cERROR(1, "calc_ntlmv2_hash: can't generate ntlmv2 hash"); 525 + cifs_dbg(VFS, "%s: can't generate ntlmv2 hash\n", __func__); 522 526 return -1; 523 527 } 524 528 525 529 rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, 526 530 ntlmv2_hash, CIFS_HMAC_MD5_HASH_SIZE); 527 531 if (rc) { 528 - cERROR(1, "%s: Could not set NTLMV2 Hash as a key", __func__); 532 + cifs_dbg(VFS, "%s: Could not set NTLMV2 Hash as a key\n", 533 + __func__); 529 534 return rc; 530 535 } 531 536 532 537 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); 533 538 if (rc) { 534 - cERROR(1, "CalcNTLMv2_response: could not init hmacmd5"); 539 + cifs_dbg(VFS, "%s: could not init hmacmd5\n", __func__); 535 540 return rc; 536 541 } 537 542 ··· 545 548 rc = crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, 546 549 ses->auth_key.response + offset, ses->auth_key.len - offset); 547 550 if (rc) { 548 - cERROR(1, "%s: Could not update with response", __func__); 551 + cifs_dbg(VFS, "%s: Could not update with response\n", __func__); 549 552 return rc; 550 553 } 551 554 552 555 rc = crypto_shash_final(&ses->server->secmech.sdeschmacmd5->shash, 553 556 ses->auth_key.response + CIFS_SESS_KEY_SIZE); 554 557 if (rc) 555 - cERROR(1, "%s: Could not generate md5 hash", __func__); 558 + cifs_dbg(VFS, "%s: Could not generate md5 hash\n", __func__); 556 559 557 560 return rc; 558 561 } ··· 572 575 if (!ses->domainName) { 573 576 rc = find_domain_name(ses, nls_cp); 574 577 if (rc) { 575 - cERROR(1, "error %d finding domain name", rc); 578 + cifs_dbg(VFS, "error %d finding domain name\n", 579 + rc); 576 580 goto setup_ntlmv2_rsp_ret; 577 581 } 578 582 } 579 583 } else { 580 584 rc = build_avpair_blob(ses, nls_cp); 581 585 if (rc) { 582 - cERROR(1, "error %d building av pair blob", rc); 586 + cifs_dbg(VFS, "error %d building av pair blob\n", rc); 583 587 goto setup_ntlmv2_rsp_ret; 584 588 } 585 589 } ··· 593 595 if (!ses->auth_key.response) { 594 596 rc = ENOMEM; 595 597 ses->auth_key.len = 0; 596 - cERROR(1, "%s: Can't allocate auth blob", __func__); 597 598 goto setup_ntlmv2_rsp_ret; 598 599 } 599 600 ses->auth_key.len += baselen; ··· 610 613 /* calculate ntlmv2_hash */ 611 614 rc = calc_ntlmv2_hash(ses, ntlmv2_hash, nls_cp); 612 615 if (rc) { 613 - cERROR(1, "could not get v2 hash rc %d", rc); 616 + cifs_dbg(VFS, "could not get v2 hash rc %d\n", rc); 614 617 goto setup_ntlmv2_rsp_ret; 615 618 } 616 619 617 620 /* calculate first part of the client response (CR1) */ 618 621 rc = CalcNTLMv2_response(ses, ntlmv2_hash); 619 622 if (rc) { 620 - cERROR(1, "Could not calculate CR1 rc: %d", rc); 623 + cifs_dbg(VFS, "Could not calculate CR1 rc: %d\n", rc); 621 624 goto setup_ntlmv2_rsp_ret; 622 625 } 623 626 ··· 625 628 rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, 626 629 ntlmv2_hash, CIFS_HMAC_MD5_HASH_SIZE); 627 630 if (rc) { 628 - cERROR(1, "%s: Could not set NTLMV2 Hash as a key", __func__); 631 + cifs_dbg(VFS, "%s: Could not set NTLMV2 Hash as a key\n", 632 + __func__); 629 633 goto setup_ntlmv2_rsp_ret; 630 634 } 631 635 632 636 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); 633 637 if (rc) { 634 - cERROR(1, "%s: Could not init hmacmd5", __func__); 638 + cifs_dbg(VFS, "%s: Could not init hmacmd5\n", __func__); 635 639 goto setup_ntlmv2_rsp_ret; 636 640 } 637 641 ··· 640 642 ses->auth_key.response + CIFS_SESS_KEY_SIZE, 641 643 CIFS_HMAC_MD5_HASH_SIZE); 642 644 if (rc) { 643 - cERROR(1, "%s: Could not update with response", __func__); 645 + cifs_dbg(VFS, "%s: Could not update with response\n", __func__); 644 646 goto setup_ntlmv2_rsp_ret; 645 647 } 646 648 647 649 rc = crypto_shash_final(&ses->server->secmech.sdeschmacmd5->shash, 648 650 ses->auth_key.response); 649 651 if (rc) 650 - cERROR(1, "%s: Could not generate md5 hash", __func__); 652 + cifs_dbg(VFS, "%s: Could not generate md5 hash\n", __func__); 651 653 652 654 setup_ntlmv2_rsp_ret: 653 655 kfree(tiblob); ··· 669 671 tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); 670 672 if (IS_ERR(tfm_arc4)) { 671 673 rc = PTR_ERR(tfm_arc4); 672 - cERROR(1, "could not allocate crypto API arc4"); 674 + cifs_dbg(VFS, "could not allocate crypto API arc4\n"); 673 675 return rc; 674 676 } 675 677 ··· 678 680 rc = crypto_blkcipher_setkey(tfm_arc4, ses->auth_key.response, 679 681 CIFS_SESS_KEY_SIZE); 680 682 if (rc) { 681 - cERROR(1, "%s: Could not set response as a key", __func__); 683 + cifs_dbg(VFS, "%s: Could not set response as a key\n", 684 + __func__); 682 685 return rc; 683 686 } 684 687 ··· 688 689 689 690 rc = crypto_blkcipher_encrypt(&desc, &sgout, &sgin, CIFS_CPHTXT_SIZE); 690 691 if (rc) { 691 - cERROR(1, "could not encrypt session key rc: %d", rc); 692 + cifs_dbg(VFS, "could not encrypt session key rc: %d\n", rc); 692 693 crypto_free_blkcipher(tfm_arc4); 693 694 return rc; 694 695 } ··· 730 731 731 732 server->secmech.hmacmd5 = crypto_alloc_shash("hmac(md5)", 0, 0); 732 733 if (IS_ERR(server->secmech.hmacmd5)) { 733 - cERROR(1, "could not allocate crypto hmacmd5"); 734 + cifs_dbg(VFS, "could not allocate crypto hmacmd5\n"); 734 735 return PTR_ERR(server->secmech.hmacmd5); 735 736 } 736 737 737 738 server->secmech.md5 = crypto_alloc_shash("md5", 0, 0); 738 739 if (IS_ERR(server->secmech.md5)) { 739 - cERROR(1, "could not allocate crypto md5"); 740 + cifs_dbg(VFS, "could not allocate crypto md5\n"); 740 741 rc = PTR_ERR(server->secmech.md5); 741 742 goto crypto_allocate_md5_fail; 742 743 } 743 744 744 745 server->secmech.hmacsha256 = crypto_alloc_shash("hmac(sha256)", 0, 0); 745 746 if (IS_ERR(server->secmech.hmacsha256)) { 746 - cERROR(1, "could not allocate crypto hmacsha256\n"); 747 + cifs_dbg(VFS, "could not allocate crypto hmacsha256\n"); 747 748 rc = PTR_ERR(server->secmech.hmacsha256); 748 749 goto crypto_allocate_hmacsha256_fail; 749 750 } ··· 752 753 crypto_shash_descsize(server->secmech.hmacmd5); 753 754 server->secmech.sdeschmacmd5 = kmalloc(size, GFP_KERNEL); 754 755 if (!server->secmech.sdeschmacmd5) { 755 - cERROR(1, "cifs_crypto_shash_allocate: can't alloc hmacmd5"); 756 756 rc = -ENOMEM; 757 757 goto crypto_allocate_hmacmd5_sdesc_fail; 758 758 } ··· 762 764 crypto_shash_descsize(server->secmech.md5); 763 765 server->secmech.sdescmd5 = kmalloc(size, GFP_KERNEL); 764 766 if (!server->secmech.sdescmd5) { 765 - cERROR(1, "cifs_crypto_shash_allocate: can't alloc md5"); 766 767 rc = -ENOMEM; 767 768 goto crypto_allocate_md5_sdesc_fail; 768 769 } ··· 772 775 crypto_shash_descsize(server->secmech.hmacsha256); 773 776 server->secmech.sdeschmacsha256 = kmalloc(size, GFP_KERNEL); 774 777 if (!server->secmech.sdeschmacsha256) { 775 - cERROR(1, "%s: Can't alloc hmacsha256\n", __func__); 776 778 rc = -ENOMEM; 777 779 goto crypto_allocate_hmacsha256_sdesc_fail; 778 780 }
+21 -15
fs/cifs/cifsfs.c
··· 161 161 162 162 #ifdef CONFIG_CIFS_NFSD_EXPORT 163 163 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { 164 - cFYI(1, "export ops supported"); 164 + cifs_dbg(FYI, "export ops supported\n"); 165 165 sb->s_export_op = &cifs_export_ops; 166 166 } 167 167 #endif /* CONFIG_CIFS_NFSD_EXPORT */ ··· 169 169 return 0; 170 170 171 171 out_no_root: 172 - cERROR(1, "cifs_read_super: get root inode failed"); 172 + cifs_dbg(VFS, "%s: get root inode failed\n", __func__); 173 173 return rc; 174 174 } 175 175 ··· 502 502 /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */ 503 503 /* cancel_notify_requests(tcon); */ 504 504 if (tcon->ses && tcon->ses->server) { 505 - cFYI(1, "wake up tasks now - umount begin not complete"); 505 + cifs_dbg(FYI, "wake up tasks now - umount begin not complete\n"); 506 506 wake_up_all(&tcon->ses->server->request_q); 507 507 wake_up_all(&tcon->ses->server->response_q); 508 508 msleep(1); /* yield */ ··· 573 573 if (full_path == NULL) 574 574 return ERR_PTR(-ENOMEM); 575 575 576 - cFYI(1, "Get root dentry for %s", full_path); 576 + cifs_dbg(FYI, "Get root dentry for %s\n", full_path); 577 577 578 578 sep = CIFS_DIR_SEP(cifs_sb); 579 579 dentry = dget(sb->s_root); ··· 632 632 struct cifs_mnt_data mnt_data; 633 633 struct dentry *root; 634 634 635 - cFYI(1, "Devname: %s flags: %d ", dev_name, flags); 635 + cifs_dbg(FYI, "Devname: %s flags: %d\n", dev_name, flags); 636 636 637 637 volume_info = cifs_get_volume_info((char *)data, dev_name); 638 638 if (IS_ERR(volume_info)) ··· 655 655 rc = cifs_mount(cifs_sb, volume_info); 656 656 if (rc) { 657 657 if (!(flags & MS_SILENT)) 658 - cERROR(1, "cifs_mount failed w/return code = %d", rc); 658 + cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n", 659 + rc); 659 660 root = ERR_PTR(rc); 660 661 goto out_mountdata; 661 662 } ··· 676 675 } 677 676 678 677 if (sb->s_root) { 679 - cFYI(1, "Use existing superblock"); 678 + cifs_dbg(FYI, "Use existing superblock\n"); 680 679 cifs_umount(cifs_sb); 681 680 } else { 682 681 rc = cifs_read_super(sb); ··· 692 691 if (IS_ERR(root)) 693 692 goto out_super; 694 693 695 - cFYI(1, "dentry root is: %p", root); 694 + cifs_dbg(FYI, "dentry root is: %p\n", root); 696 695 goto out; 697 696 698 697 out_super: ··· 724 723 725 724 rc = filemap_fdatawrite(inode->i_mapping); 726 725 if (rc) 727 - cFYI(1, "cifs_file_aio_write: %d rc on %p inode", rc, inode); 726 + cifs_dbg(FYI, "cifs_file_aio_write: %d rc on %p inode\n", 727 + rc, inode); 728 728 729 729 return written; 730 730 } ··· 1032 1030 } else { 1033 1031 CIFSMaxBufSize &= 0x1FE00; /* Round size to even 512 byte mult*/ 1034 1032 } 1035 - /* cERROR(1, "CIFSMaxBufSize %d 0x%x",CIFSMaxBufSize,CIFSMaxBufSize); */ 1033 + /* 1034 + cifs_dbg(VFS, "CIFSMaxBufSize %d 0x%x\n", 1035 + CIFSMaxBufSize, CIFSMaxBufSize); 1036 + */ 1036 1037 cifs_req_cachep = kmem_cache_create("cifs_request", 1037 1038 CIFSMaxBufSize + max_hdr_size, 0, 1038 1039 SLAB_HWCACHE_ALIGN, NULL); ··· 1046 1041 cifs_min_rcv = 1; 1047 1042 else if (cifs_min_rcv > 64) { 1048 1043 cifs_min_rcv = 64; 1049 - cERROR(1, "cifs_min_rcv set to maximum (64)"); 1044 + cifs_dbg(VFS, "cifs_min_rcv set to maximum (64)\n"); 1050 1045 } 1051 1046 1052 1047 cifs_req_poolp = mempool_create_slab_pool(cifs_min_rcv, ··· 1077 1072 cifs_min_small = 2; 1078 1073 else if (cifs_min_small > 256) { 1079 1074 cifs_min_small = 256; 1080 - cFYI(1, "cifs_min_small set to maximum (256)"); 1075 + cifs_dbg(FYI, "cifs_min_small set to maximum (256)\n"); 1081 1076 } 1082 1077 1083 1078 cifs_sm_req_poolp = mempool_create_slab_pool(cifs_min_small, ··· 1168 1163 1169 1164 if (cifs_max_pending < 2) { 1170 1165 cifs_max_pending = 2; 1171 - cFYI(1, "cifs_max_pending set to min of 2"); 1166 + cifs_dbg(FYI, "cifs_max_pending set to min of 2\n"); 1172 1167 } else if (cifs_max_pending > CIFS_MAX_REQ) { 1173 1168 cifs_max_pending = CIFS_MAX_REQ; 1174 - cFYI(1, "cifs_max_pending set to max of %u", CIFS_MAX_REQ); 1169 + cifs_dbg(FYI, "cifs_max_pending set to max of %u\n", 1170 + CIFS_MAX_REQ); 1175 1171 } 1176 1172 1177 1173 cifsiod_wq = alloc_workqueue("cifsiod", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); ··· 1241 1235 static void __exit 1242 1236 exit_cifs(void) 1243 1237 { 1244 - cFYI(DBG2, "exit_cifs"); 1238 + cifs_dbg(NOISY, "exit_cifs\n"); 1245 1239 unregister_filesystem(&cifs_fs_type); 1246 1240 cifs_dfs_release_automount_timer(); 1247 1241 #ifdef CONFIG_CIFS_ACL
+5 -5
fs/cifs/cifsproto.h
··· 45 45 #define get_xid() \ 46 46 ({ \ 47 47 unsigned int __xid = _get_xid(); \ 48 - cFYI(1, "CIFS VFS: in %s as Xid: %u with uid: %d", \ 49 - __func__, __xid, \ 50 - from_kuid(&init_user_ns, current_fsuid())); \ 48 + cifs_dbg(FYI, "CIFS VFS: in %s as Xid: %u with uid: %d\n", \ 49 + __func__, __xid, \ 50 + from_kuid(&init_user_ns, current_fsuid())); \ 51 51 __xid; \ 52 52 }) 53 53 54 54 #define free_xid(curr_xid) \ 55 55 do { \ 56 56 _free_xid(curr_xid); \ 57 - cFYI(1, "CIFS VFS: leaving %s (xid = %u) rc = %d", \ 58 - __func__, curr_xid, (int)rc); \ 57 + cifs_dbg(FYI, "CIFS VFS: leaving %s (xid = %u) rc = %d\n", \ 58 + __func__, curr_xid, (int)rc); \ 59 59 } while (0) 60 60 extern int init_cifs_idmap(void); 61 61 extern void exit_cifs_idmap(void);
+246 -242
fs/cifs/cifssmb.c
··· 139 139 if (smb_command != SMB_COM_WRITE_ANDX && 140 140 smb_command != SMB_COM_OPEN_ANDX && 141 141 smb_command != SMB_COM_TREE_DISCONNECT) { 142 - cFYI(1, "can not send cmd %d while umounting", 143 - smb_command); 142 + cifs_dbg(FYI, "can not send cmd %d while umounting\n", 143 + smb_command); 144 144 return -ENODEV; 145 145 } 146 146 } ··· 163 163 * back on-line 164 164 */ 165 165 if (!tcon->retry) { 166 - cFYI(1, "gave up waiting on reconnect in smb_init"); 166 + cifs_dbg(FYI, "gave up waiting on reconnect in smb_init\n"); 167 167 return -EHOSTDOWN; 168 168 } 169 169 } ··· 191 191 cifs_mark_open_files_invalid(tcon); 192 192 rc = CIFSTCon(0, ses, tcon->treeName, tcon, nls_codepage); 193 193 mutex_unlock(&ses->session_mutex); 194 - cFYI(1, "reconnect tcon rc = %d", rc); 194 + cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); 195 195 196 196 if (rc) 197 197 goto out; ··· 396 396 else /* if override flags set only sign/seal OR them with global auth */ 397 397 secFlags = global_secflags | ses->overrideSecFlg; 398 398 399 - cFYI(1, "secFlags 0x%x", secFlags); 399 + cifs_dbg(FYI, "secFlags 0x%x\n", secFlags); 400 400 401 401 pSMB->hdr.Mid = get_next_mid(server); 402 402 pSMB->hdr.Flags2 |= (SMBFLG2_UNICODE | SMBFLG2_ERR_STATUS); ··· 404 404 if ((secFlags & CIFSSEC_MUST_KRB5) == CIFSSEC_MUST_KRB5) 405 405 pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; 406 406 else if ((secFlags & CIFSSEC_AUTH_MASK) == CIFSSEC_MAY_KRB5) { 407 - cFYI(1, "Kerberos only mechanism, enable extended security"); 407 + cifs_dbg(FYI, "Kerberos only mechanism, enable extended security\n"); 408 408 pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; 409 409 } else if ((secFlags & CIFSSEC_MUST_NTLMSSP) == CIFSSEC_MUST_NTLMSSP) 410 410 pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; 411 411 else if ((secFlags & CIFSSEC_AUTH_MASK) == CIFSSEC_MAY_NTLMSSP) { 412 - cFYI(1, "NTLMSSP only mechanism, enable extended security"); 412 + cifs_dbg(FYI, "NTLMSSP only mechanism, enable extended security\n"); 413 413 pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; 414 414 } 415 415 ··· 428 428 goto neg_err_exit; 429 429 430 430 server->dialect = le16_to_cpu(pSMBr->DialectIndex); 431 - cFYI(1, "Dialect: %d", server->dialect); 431 + cifs_dbg(FYI, "Dialect: %d\n", server->dialect); 432 432 /* Check wct = 1 error case */ 433 433 if ((pSMBr->hdr.WordCount < 13) || (server->dialect == BAD_PROT)) { 434 434 /* core returns wct = 1, but we do not ask for core - otherwise ··· 447 447 (secFlags & CIFSSEC_MAY_PLNTXT)) 448 448 server->secType = LANMAN; 449 449 else { 450 - cERROR(1, "mount failed weak security disabled" 451 - " in /proc/fs/cifs/SecurityFlags"); 450 + cifs_dbg(VFS, "mount failed weak security disabled in /proc/fs/cifs/SecurityFlags\n"); 452 451 rc = -EOPNOTSUPP; 453 452 goto neg_err_exit; 454 453 } ··· 481 482 utc = CURRENT_TIME; 482 483 ts = cnvrtDosUnixTm(rsp->SrvTime.Date, 483 484 rsp->SrvTime.Time, 0); 484 - cFYI(1, "SrvTime %d sec since 1970 (utc: %d) diff: %d", 485 - (int)ts.tv_sec, (int)utc.tv_sec, 486 - (int)(utc.tv_sec - ts.tv_sec)); 485 + cifs_dbg(FYI, "SrvTime %d sec since 1970 (utc: %d) diff: %d\n", 486 + (int)ts.tv_sec, (int)utc.tv_sec, 487 + (int)(utc.tv_sec - ts.tv_sec)); 487 488 val = (int)(utc.tv_sec - ts.tv_sec); 488 489 seconds = abs(val); 489 490 result = (seconds / MIN_TZ_ADJ) * MIN_TZ_ADJ; ··· 497 498 server->timeAdj = (int)tmp; 498 499 server->timeAdj *= 60; /* also in seconds */ 499 500 } 500 - cFYI(1, "server->timeAdj: %d seconds", server->timeAdj); 501 + cifs_dbg(FYI, "server->timeAdj: %d seconds\n", server->timeAdj); 501 502 502 503 503 504 /* BB get server time for time conversions and add ··· 512 513 goto neg_err_exit; 513 514 } 514 515 515 - cFYI(1, "LANMAN negotiated"); 516 + cifs_dbg(FYI, "LANMAN negotiated\n"); 516 517 /* we will not end up setting signing flags - as no signing 517 518 was in LANMAN and server did not return the flags on */ 518 519 goto signing_check; 519 520 #else /* weak security disabled */ 520 521 } else if (pSMBr->hdr.WordCount == 13) { 521 - cERROR(1, "mount failed, cifs module not built " 522 - "with CIFS_WEAK_PW_HASH support"); 522 + cifs_dbg(VFS, "mount failed, cifs module not built with CIFS_WEAK_PW_HASH support\n"); 523 523 rc = -EOPNOTSUPP; 524 524 #endif /* WEAK_PW_HASH */ 525 525 goto neg_err_exit; ··· 530 532 /* else wct == 17 NTLM */ 531 533 server->sec_mode = pSMBr->SecurityMode; 532 534 if ((server->sec_mode & SECMODE_USER) == 0) 533 - cFYI(1, "share mode security"); 535 + cifs_dbg(FYI, "share mode security\n"); 534 536 535 537 if ((server->sec_mode & SECMODE_PW_ENCRYPT) == 0) 536 538 #ifdef CONFIG_CIFS_WEAK_PW_HASH 537 539 if ((secFlags & CIFSSEC_MAY_PLNTXT) == 0) 538 540 #endif /* CIFS_WEAK_PW_HASH */ 539 - cERROR(1, "Server requests plain text password" 540 - " but client support disabled"); 541 + cifs_dbg(VFS, "Server requests plain text password but client support disabled\n"); 541 542 542 543 if ((secFlags & CIFSSEC_MUST_NTLMV2) == CIFSSEC_MUST_NTLMV2) 543 544 server->secType = NTLMv2; ··· 552 555 server->secType = LANMAN; 553 556 else { 554 557 rc = -EOPNOTSUPP; 555 - cERROR(1, "Invalid security type"); 558 + cifs_dbg(VFS, "Invalid security type\n"); 556 559 goto neg_err_exit; 557 560 } 558 561 /* else ... any others ...? */ ··· 565 568 /* probably no need to store and check maxvcs */ 566 569 server->maxBuf = le32_to_cpu(pSMBr->MaxBufferSize); 567 570 server->max_rw = le32_to_cpu(pSMBr->MaxRawSize); 568 - cFYI(DBG2, "Max buf = %d", ses->server->maxBuf); 571 + cifs_dbg(NOISY, "Max buf = %d\n", ses->server->maxBuf); 569 572 server->capabilities = le32_to_cpu(pSMBr->Capabilities); 570 573 server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone); 571 574 server->timeAdj *= 60; ··· 587 590 if (memcmp(server->server_GUID, 588 591 pSMBr->u.extended_response. 589 592 GUID, 16) != 0) { 590 - cFYI(1, "server UID changed"); 593 + cifs_dbg(FYI, "server UID changed\n"); 591 594 memcpy(server->server_GUID, 592 595 pSMBr->u.extended_response.GUID, 593 596 16); ··· 630 633 if ((secFlags & CIFSSEC_MAY_SIGN) == 0) { 631 634 /* MUST_SIGN already includes the MAY_SIGN FLAG 632 635 so if this is zero it means that signing is disabled */ 633 - cFYI(1, "Signing disabled"); 636 + cifs_dbg(FYI, "Signing disabled\n"); 634 637 if (server->sec_mode & SECMODE_SIGN_REQUIRED) { 635 - cERROR(1, "Server requires " 636 - "packet signing to be enabled in " 637 - "/proc/fs/cifs/SecurityFlags."); 638 + cifs_dbg(VFS, "Server requires packet signing to be enabled in /proc/fs/cifs/SecurityFlags\n"); 638 639 rc = -EOPNOTSUPP; 639 640 } 640 641 server->sec_mode &= 641 642 ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); 642 643 } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { 643 644 /* signing required */ 644 - cFYI(1, "Must sign - secFlags 0x%x", secFlags); 645 + cifs_dbg(FYI, "Must sign - secFlags 0x%x\n", secFlags); 645 646 if ((server->sec_mode & 646 647 (SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) { 647 - cERROR(1, "signing required but server lacks support"); 648 + cifs_dbg(VFS, "signing required but server lacks support\n"); 648 649 rc = -EOPNOTSUPP; 649 650 } else 650 651 server->sec_mode |= SECMODE_SIGN_REQUIRED; ··· 656 661 neg_err_exit: 657 662 cifs_buf_release(pSMB); 658 663 659 - cFYI(1, "negprot rc %d", rc); 664 + cifs_dbg(FYI, "negprot rc %d\n", rc); 660 665 return rc; 661 666 } 662 667 ··· 666 671 struct smb_hdr *smb_buffer; 667 672 int rc = 0; 668 673 669 - cFYI(1, "In tree disconnect"); 674 + cifs_dbg(FYI, "In tree disconnect\n"); 670 675 671 676 /* BB: do we need to check this? These should never be NULL. */ 672 677 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) ··· 688 693 689 694 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); 690 695 if (rc) 691 - cFYI(1, "Tree disconnect failed %d", rc); 696 + cifs_dbg(FYI, "Tree disconnect failed %d\n", rc); 692 697 693 698 /* No need to return error on this operation if tid invalidated and 694 699 closed on server already e.g. due to tcp session crashing */ ··· 723 728 struct smb_rqst rqst = { .rq_iov = &iov, 724 729 .rq_nvec = 1 }; 725 730 726 - cFYI(1, "In echo request"); 731 + cifs_dbg(FYI, "In echo request\n"); 727 732 728 733 rc = small_smb_init(SMB_COM_ECHO, 0, NULL, (void **)&smb); 729 734 if (rc) ··· 742 747 rc = cifs_call_async(server, &rqst, NULL, cifs_echo_callback, 743 748 server, CIFS_ASYNC_OP | CIFS_ECHO_OP); 744 749 if (rc) 745 - cFYI(1, "Echo request failed: %d", rc); 750 + cifs_dbg(FYI, "Echo request failed: %d\n", rc); 746 751 747 752 cifs_small_buf_release(smb); 748 753 ··· 755 760 LOGOFF_ANDX_REQ *pSMB; 756 761 int rc = 0; 757 762 758 - cFYI(1, "In SMBLogoff for session disconnect"); 763 + cifs_dbg(FYI, "In SMBLogoff for session disconnect\n"); 759 764 760 765 /* 761 766 * BB: do we need to check validity of ses and server? They should ··· 809 814 int bytes_returned = 0; 810 815 __u16 params, param_offset, offset, byte_count; 811 816 812 - cFYI(1, "In POSIX delete"); 817 + cifs_dbg(FYI, "In POSIX delete\n"); 813 818 PsxDelete: 814 819 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 815 820 (void **) &pSMBr); ··· 861 866 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 862 867 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 863 868 if (rc) 864 - cFYI(1, "Posix delete returned %d", rc); 869 + cifs_dbg(FYI, "Posix delete returned %d\n", rc); 865 870 cifs_buf_release(pSMB); 866 871 867 872 cifs_stats_inc(&tcon->stats.cifs_stats.num_deletes); ··· 909 914 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 910 915 cifs_stats_inc(&tcon->stats.cifs_stats.num_deletes); 911 916 if (rc) 912 - cFYI(1, "Error in RMFile = %d", rc); 917 + cifs_dbg(FYI, "Error in RMFile = %d\n", rc); 913 918 914 919 cifs_buf_release(pSMB); 915 920 if (rc == -EAGAIN) ··· 929 934 int name_len; 930 935 int remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR; 931 936 932 - cFYI(1, "In CIFSSMBRmDir"); 937 + cifs_dbg(FYI, "In CIFSSMBRmDir\n"); 933 938 RmDirRetry: 934 939 rc = smb_init(SMB_COM_DELETE_DIRECTORY, 0, tcon, (void **) &pSMB, 935 940 (void **) &pSMBr); ··· 955 960 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 956 961 cifs_stats_inc(&tcon->stats.cifs_stats.num_rmdirs); 957 962 if (rc) 958 - cFYI(1, "Error in RMDir = %d", rc); 963 + cifs_dbg(FYI, "Error in RMDir = %d\n", rc); 959 964 960 965 cifs_buf_release(pSMB); 961 966 if (rc == -EAGAIN) ··· 974 979 int name_len; 975 980 int remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR; 976 981 977 - cFYI(1, "In CIFSSMBMkDir"); 982 + cifs_dbg(FYI, "In CIFSSMBMkDir\n"); 978 983 MkDirRetry: 979 984 rc = smb_init(SMB_COM_CREATE_DIRECTORY, 0, tcon, (void **) &pSMB, 980 985 (void **) &pSMBr); ··· 1000 1005 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 1001 1006 cifs_stats_inc(&tcon->stats.cifs_stats.num_mkdirs); 1002 1007 if (rc) 1003 - cFYI(1, "Error in Mkdir = %d", rc); 1008 + cifs_dbg(FYI, "Error in Mkdir = %d\n", rc); 1004 1009 1005 1010 cifs_buf_release(pSMB); 1006 1011 if (rc == -EAGAIN) ··· 1024 1029 OPEN_PSX_REQ *pdata; 1025 1030 OPEN_PSX_RSP *psx_rsp; 1026 1031 1027 - cFYI(1, "In POSIX Create"); 1032 + cifs_dbg(FYI, "In POSIX Create\n"); 1028 1033 PsxCreat: 1029 1034 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 1030 1035 (void **) &pSMBr); ··· 1078 1083 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 1079 1084 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 1080 1085 if (rc) { 1081 - cFYI(1, "Posix create returned %d", rc); 1086 + cifs_dbg(FYI, "Posix create returned %d\n", rc); 1082 1087 goto psx_create_err; 1083 1088 } 1084 1089 1085 - cFYI(1, "copying inode info"); 1090 + cifs_dbg(FYI, "copying inode info\n"); 1086 1091 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 1087 1092 1088 1093 if (rc || get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)) { ··· 1104 1109 /* check to make sure response data is there */ 1105 1110 if (psx_rsp->ReturnedLevel != cpu_to_le16(SMB_QUERY_FILE_UNIX_BASIC)) { 1106 1111 pRetData->Type = cpu_to_le32(-1); /* unknown */ 1107 - cFYI(DBG2, "unknown type"); 1112 + cifs_dbg(NOISY, "unknown type\n"); 1108 1113 } else { 1109 1114 if (get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP) 1110 1115 + sizeof(FILE_UNIX_BASIC_INFO)) { 1111 - cERROR(1, "Open response data too small"); 1116 + cifs_dbg(VFS, "Open response data too small\n"); 1112 1117 pRetData->Type = cpu_to_le32(-1); 1113 1118 goto psx_create_err; 1114 1119 } ··· 1155 1160 ofun = SMBOPEN_OCREATE | SMBOPEN_OTRUNC; 1156 1161 break; 1157 1162 default: 1158 - cFYI(1, "unknown disposition %d", disposition); 1163 + cifs_dbg(FYI, "unknown disposition %d\n", disposition); 1159 1164 ofun = SMBOPEN_OAPPEND; /* regular open */ 1160 1165 } 1161 1166 return ofun; ··· 1246 1251 (struct smb_hdr *)pSMBr, &bytes_returned, 0); 1247 1252 cifs_stats_inc(&tcon->stats.cifs_stats.num_opens); 1248 1253 if (rc) { 1249 - cFYI(1, "Error in Open = %d", rc); 1254 + cifs_dbg(FYI, "Error in Open = %d\n", rc); 1250 1255 } else { 1251 1256 /* BB verify if wct == 15 */ 1252 1257 ··· 1359 1364 (struct smb_hdr *)pSMBr, &bytes_returned, 0); 1360 1365 cifs_stats_inc(&tcon->stats.cifs_stats.num_opens); 1361 1366 if (rc) { 1362 - cFYI(1, "Error in Open = %d", rc); 1367 + cifs_dbg(FYI, "Error in Open = %d\n", rc); 1363 1368 } else { 1364 1369 *pOplock = pSMBr->OplockLevel; /* 1 byte no need to le_to_cpu */ 1365 1370 *netfid = pSMBr->Fid; /* cifs fid stays in le */ ··· 1420 1425 char *buf = server->smallbuf; 1421 1426 unsigned int buflen = get_rfc1002_length(buf) + 4; 1422 1427 1423 - cFYI(1, "%s: mid=%llu offset=%llu bytes=%u", __func__, 1424 - mid->mid, rdata->offset, rdata->bytes); 1428 + cifs_dbg(FYI, "%s: mid=%llu offset=%llu bytes=%u\n", 1429 + __func__, mid->mid, rdata->offset, rdata->bytes); 1425 1430 1426 1431 /* 1427 1432 * read the rest of READ_RSP header (sans Data array), or whatever we ··· 1442 1447 /* Was the SMB read successful? */ 1443 1448 rdata->result = server->ops->map_error(buf, false); 1444 1449 if (rdata->result != 0) { 1445 - cFYI(1, "%s: server returned error %d", __func__, 1446 - rdata->result); 1450 + cifs_dbg(FYI, "%s: server returned error %d\n", 1451 + __func__, rdata->result); 1447 1452 return cifs_readv_discard(server, mid); 1448 1453 } 1449 1454 1450 1455 /* Is there enough to get to the rest of the READ_RSP header? */ 1451 1456 if (server->total_read < server->vals->read_rsp_size) { 1452 - cFYI(1, "%s: server returned short header. got=%u expected=%zu", 1453 - __func__, server->total_read, 1454 - server->vals->read_rsp_size); 1457 + cifs_dbg(FYI, "%s: server returned short header. got=%u expected=%zu\n", 1458 + __func__, server->total_read, 1459 + server->vals->read_rsp_size); 1455 1460 rdata->result = -EIO; 1456 1461 return cifs_readv_discard(server, mid); 1457 1462 } ··· 1463 1468 * is beyond the EOF. Treat it as if the data starts just after 1464 1469 * the header. 1465 1470 */ 1466 - cFYI(1, "%s: data offset (%u) inside read response header", 1467 - __func__, data_offset); 1471 + cifs_dbg(FYI, "%s: data offset (%u) inside read response header\n", 1472 + __func__, data_offset); 1468 1473 data_offset = server->total_read; 1469 1474 } else if (data_offset > MAX_CIFS_SMALL_BUFFER_SIZE) { 1470 1475 /* data_offset is beyond the end of smallbuf */ 1471 - cFYI(1, "%s: data offset (%u) beyond end of smallbuf", 1472 - __func__, data_offset); 1476 + cifs_dbg(FYI, "%s: data offset (%u) beyond end of smallbuf\n", 1477 + __func__, data_offset); 1473 1478 rdata->result = -EIO; 1474 1479 return cifs_readv_discard(server, mid); 1475 1480 } 1476 1481 1477 - cFYI(1, "%s: total_read=%u data_offset=%u", __func__, 1478 - server->total_read, data_offset); 1482 + cifs_dbg(FYI, "%s: total_read=%u data_offset=%u\n", 1483 + __func__, server->total_read, data_offset); 1479 1484 1480 1485 len = data_offset - server->total_read; 1481 1486 if (len > 0) { ··· 1491 1496 /* set up first iov for signature check */ 1492 1497 rdata->iov.iov_base = buf; 1493 1498 rdata->iov.iov_len = server->total_read; 1494 - cFYI(1, "0: iov_base=%p iov_len=%zu", 1495 - rdata->iov.iov_base, rdata->iov.iov_len); 1499 + cifs_dbg(FYI, "0: iov_base=%p iov_len=%zu\n", 1500 + rdata->iov.iov_base, rdata->iov.iov_len); 1496 1501 1497 1502 /* how much data is in the response? */ 1498 1503 data_len = server->ops->read_data_length(buf); ··· 1509 1514 server->total_read += length; 1510 1515 rdata->bytes = length; 1511 1516 1512 - cFYI(1, "total_read=%u buflen=%u remaining=%u", server->total_read, 1513 - buflen, data_len); 1517 + cifs_dbg(FYI, "total_read=%u buflen=%u remaining=%u\n", 1518 + server->total_read, buflen, data_len); 1514 1519 1515 1520 /* discard anything left over */ 1516 1521 if (server->total_read < buflen) ··· 1533 1538 .rq_pagesz = rdata->pagesz, 1534 1539 .rq_tailsz = rdata->tailsz }; 1535 1540 1536 - cFYI(1, "%s: mid=%llu state=%d result=%d bytes=%u", __func__, 1537 - mid->mid, mid->mid_state, rdata->result, rdata->bytes); 1541 + cifs_dbg(FYI, "%s: mid=%llu state=%d result=%d bytes=%u\n", 1542 + __func__, mid->mid, mid->mid_state, rdata->result, 1543 + rdata->bytes); 1538 1544 1539 1545 switch (mid->mid_state) { 1540 1546 case MID_RESPONSE_RECEIVED: ··· 1545 1549 int rc = 0; 1546 1550 1547 1551 rc = cifs_verify_signature(&rqst, server, 1548 - mid->sequence_number + 1); 1552 + mid->sequence_number); 1549 1553 if (rc) 1550 - cERROR(1, "SMB signature verification returned " 1551 - "error = %d", rc); 1554 + cifs_dbg(VFS, "SMB signature verification returned error = %d\n", 1555 + rc); 1552 1556 } 1553 1557 /* FIXME: should this be counted toward the initiating task? */ 1554 1558 task_io_account_read(rdata->bytes); ··· 1578 1582 struct smb_rqst rqst = { .rq_iov = &rdata->iov, 1579 1583 .rq_nvec = 1 }; 1580 1584 1581 - cFYI(1, "%s: offset=%llu bytes=%u", __func__, 1582 - rdata->offset, rdata->bytes); 1585 + cifs_dbg(FYI, "%s: offset=%llu bytes=%u\n", 1586 + __func__, rdata->offset, rdata->bytes); 1583 1587 1584 1588 if (tcon->ses->capabilities & CAP_LARGE_FILES) 1585 1589 wct = 12; ··· 1649 1653 struct cifs_tcon *tcon = io_parms->tcon; 1650 1654 unsigned int count = io_parms->length; 1651 1655 1652 - cFYI(1, "Reading %d bytes on fid %d", count, netfid); 1656 + cifs_dbg(FYI, "Reading %d bytes on fid %d\n", count, netfid); 1653 1657 if (tcon->ses->capabilities & CAP_LARGE_FILES) 1654 1658 wct = 12; 1655 1659 else { ··· 1697 1701 cifs_stats_inc(&tcon->stats.cifs_stats.num_reads); 1698 1702 pSMBr = (READ_RSP *)iov[0].iov_base; 1699 1703 if (rc) { 1700 - cERROR(1, "Send error in read = %d", rc); 1704 + cifs_dbg(VFS, "Send error in read = %d\n", rc); 1701 1705 } else { 1702 1706 int data_length = le16_to_cpu(pSMBr->DataLengthHigh); 1703 1707 data_length = data_length << 16; ··· 1707 1711 /*check that DataLength would not go beyond end of SMB */ 1708 1712 if ((data_length > CIFSMaxBufSize) 1709 1713 || (data_length > count)) { 1710 - cFYI(1, "bad length %d for count %d", 1714 + cifs_dbg(FYI, "bad length %d for count %d\n", 1711 1715 data_length, count); 1712 1716 rc = -EIO; 1713 1717 *nbytes = 0; ··· 1715 1719 pReadData = (char *) (&pSMBr->hdr.Protocol) + 1716 1720 le16_to_cpu(pSMBr->DataOffset); 1717 1721 /* if (rc = copy_to_user(buf, pReadData, data_length)) { 1718 - cERROR(1, "Faulting on read rc = %d",rc); 1722 + cifs_dbg(VFS, "Faulting on read rc = %d\n",rc); 1719 1723 rc = -EFAULT; 1720 1724 }*/ /* can not use copy_to_user when using page cache*/ 1721 1725 if (*buf) ··· 1763 1767 1764 1768 *nbytes = 0; 1765 1769 1766 - /* cFYI(1, "write at %lld %d bytes", offset, count);*/ 1770 + /* cifs_dbg(FYI, "write at %lld %d bytes\n", offset, count);*/ 1767 1771 if (tcon->ses == NULL) 1768 1772 return -ECONNABORTED; 1769 1773 ··· 1848 1852 (struct smb_hdr *) pSMBr, &bytes_returned, long_op); 1849 1853 cifs_stats_inc(&tcon->stats.cifs_stats.num_writes); 1850 1854 if (rc) { 1851 - cFYI(1, "Send error in write = %d", rc); 1855 + cifs_dbg(FYI, "Send error in write = %d\n", rc); 1852 1856 } else { 1853 1857 *nbytes = le16_to_cpu(pSMBr->CountHigh); 1854 1858 *nbytes = (*nbytes) << 16; ··· 1955 1959 1956 1960 /* this would overflow */ 1957 1961 if (nr_pages == 0) { 1958 - cERROR(1, "%s: called with nr_pages == 0!", __func__); 1962 + cifs_dbg(VFS, "%s: called with nr_pages == 0!\n", __func__); 1959 1963 return NULL; 1960 1964 } 1961 1965 ··· 2071 2075 rqst.rq_pagesz = wdata->pagesz; 2072 2076 rqst.rq_tailsz = wdata->tailsz; 2073 2077 2074 - cFYI(1, "async write at %llu %u bytes", wdata->offset, wdata->bytes); 2078 + cifs_dbg(FYI, "async write at %llu %u bytes\n", 2079 + wdata->offset, wdata->bytes); 2075 2080 2076 2081 smb->DataLengthLow = cpu_to_le16(wdata->bytes & 0xFFFF); 2077 2082 smb->DataLengthHigh = cpu_to_le16(wdata->bytes >> 16); ··· 2120 2123 2121 2124 *nbytes = 0; 2122 2125 2123 - cFYI(1, "write2 at %lld %d bytes", (long long)offset, count); 2126 + cifs_dbg(FYI, "write2 at %lld %d bytes\n", (long long)offset, count); 2124 2127 2125 2128 if (tcon->ses->capabilities & CAP_LARGE_FILES) { 2126 2129 wct = 14; ··· 2179 2182 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0); 2180 2183 cifs_stats_inc(&tcon->stats.cifs_stats.num_writes); 2181 2184 if (rc) { 2182 - cFYI(1, "Send error Write2 = %d", rc); 2185 + cifs_dbg(FYI, "Send error Write2 = %d\n", rc); 2183 2186 } else if (resp_buf_type == 0) { 2184 2187 /* presumably this can not happen, but best to be safe */ 2185 2188 rc = -EIO; ··· 2220 2223 int resp_buf_type; 2221 2224 __u16 count; 2222 2225 2223 - cFYI(1, "cifs_lockv num lock %d num unlock %d", num_lock, num_unlock); 2226 + cifs_dbg(FYI, "cifs_lockv num lock %d num unlock %d\n", 2227 + num_lock, num_unlock); 2224 2228 2225 2229 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); 2226 2230 if (rc) ··· 2247 2249 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); 2248 2250 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, CIFS_NO_RESP); 2249 2251 if (rc) 2250 - cFYI(1, "Send error in cifs_lockv = %d", rc); 2252 + cifs_dbg(FYI, "Send error in cifs_lockv = %d\n", rc); 2251 2253 2252 2254 return rc; 2253 2255 } ··· 2266 2268 int flags = 0; 2267 2269 __u16 count; 2268 2270 2269 - cFYI(1, "CIFSSMBLock timeout %d numLock %d", (int)waitFlag, numLock); 2271 + cifs_dbg(FYI, "CIFSSMBLock timeout %d numLock %d\n", 2272 + (int)waitFlag, numLock); 2270 2273 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); 2271 2274 2272 2275 if (rc) ··· 2316 2317 } 2317 2318 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); 2318 2319 if (rc) 2319 - cFYI(1, "Send error in Lock = %d", rc); 2320 + cifs_dbg(FYI, "Send error in Lock = %d\n", rc); 2320 2321 2321 2322 /* Note: On -EAGAIN error only caller can retry on handle based calls 2322 2323 since file handle passed in no longer valid */ ··· 2340 2341 __u16 params, param_offset, offset, byte_count, count; 2341 2342 struct kvec iov[1]; 2342 2343 2343 - cFYI(1, "Posix Lock"); 2344 + cifs_dbg(FYI, "Posix Lock\n"); 2344 2345 2345 2346 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); 2346 2347 ··· 2407 2408 } 2408 2409 2409 2410 if (rc) { 2410 - cFYI(1, "Send error in Posix Lock = %d", rc); 2411 + cifs_dbg(FYI, "Send error in Posix Lock = %d\n", rc); 2411 2412 } else if (pLockData) { 2412 2413 /* lock structure can be returned on get */ 2413 2414 __u16 data_offset; ··· 2464 2465 { 2465 2466 int rc = 0; 2466 2467 CLOSE_REQ *pSMB = NULL; 2467 - cFYI(1, "In CIFSSMBClose"); 2468 + cifs_dbg(FYI, "In CIFSSMBClose\n"); 2468 2469 2469 2470 /* do not retry on dead session on close */ 2470 2471 rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB); ··· 2481 2482 if (rc) { 2482 2483 if (rc != -EINTR) { 2483 2484 /* EINTR is expected when user ctl-c to kill app */ 2484 - cERROR(1, "Send error in Close = %d", rc); 2485 + cifs_dbg(VFS, "Send error in Close = %d\n", rc); 2485 2486 } 2486 2487 } 2487 2488 ··· 2497 2498 { 2498 2499 int rc = 0; 2499 2500 FLUSH_REQ *pSMB = NULL; 2500 - cFYI(1, "In CIFSSMBFlush"); 2501 + cifs_dbg(FYI, "In CIFSSMBFlush\n"); 2501 2502 2502 2503 rc = small_smb_init(SMB_COM_FLUSH, 1, tcon, (void **) &pSMB); 2503 2504 if (rc) ··· 2508 2509 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); 2509 2510 cifs_stats_inc(&tcon->stats.cifs_stats.num_flushes); 2510 2511 if (rc) 2511 - cERROR(1, "Send error in Flush = %d", rc); 2512 + cifs_dbg(VFS, "Send error in Flush = %d\n", rc); 2512 2513 2513 2514 return rc; 2514 2515 } ··· 2526 2527 __u16 count; 2527 2528 int remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR; 2528 2529 2529 - cFYI(1, "In CIFSSMBRename"); 2530 + cifs_dbg(FYI, "In CIFSSMBRename\n"); 2530 2531 renameRetry: 2531 2532 rc = smb_init(SMB_COM_RENAME, 1, tcon, (void **) &pSMB, 2532 2533 (void **) &pSMBr); ··· 2573 2574 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 2574 2575 cifs_stats_inc(&tcon->stats.cifs_stats.num_renames); 2575 2576 if (rc) 2576 - cFYI(1, "Send error in rename = %d", rc); 2577 + cifs_dbg(FYI, "Send error in rename = %d\n", rc); 2577 2578 2578 2579 cifs_buf_release(pSMB); 2579 2580 ··· 2597 2598 int len_of_str; 2598 2599 __u16 params, param_offset, offset, count, byte_count; 2599 2600 2600 - cFYI(1, "Rename to File by handle"); 2601 + cifs_dbg(FYI, "Rename to File by handle\n"); 2601 2602 rc = smb_init(SMB_COM_TRANSACTION2, 15, pTcon, (void **) &pSMB, 2602 2603 (void **) &pSMBr); 2603 2604 if (rc) ··· 2654 2655 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 2655 2656 cifs_stats_inc(&pTcon->stats.cifs_stats.num_t2renames); 2656 2657 if (rc) 2657 - cFYI(1, "Send error in Rename (by file handle) = %d", rc); 2658 + cifs_dbg(FYI, "Send error in Rename (by file handle) = %d\n", 2659 + rc); 2658 2660 2659 2661 cifs_buf_release(pSMB); 2660 2662 ··· 2677 2677 int name_len, name_len2; 2678 2678 __u16 count; 2679 2679 2680 - cFYI(1, "In CIFSSMBCopy"); 2680 + cifs_dbg(FYI, "In CIFSSMBCopy\n"); 2681 2681 copyRetry: 2682 2682 rc = smb_init(SMB_COM_COPY, 1, tcon, (void **) &pSMB, 2683 2683 (void **) &pSMBr); ··· 2722 2722 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 2723 2723 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 2724 2724 if (rc) { 2725 - cFYI(1, "Send error in copy = %d with %d files copied", 2726 - rc, le16_to_cpu(pSMBr->CopyCount)); 2725 + cifs_dbg(FYI, "Send error in copy = %d with %d files copied\n", 2726 + rc, le16_to_cpu(pSMBr->CopyCount)); 2727 2727 } 2728 2728 cifs_buf_release(pSMB); 2729 2729 ··· 2747 2747 int bytes_returned = 0; 2748 2748 __u16 params, param_offset, offset, byte_count; 2749 2749 2750 - cFYI(1, "In Symlink Unix style"); 2750 + cifs_dbg(FYI, "In Symlink Unix style\n"); 2751 2751 createSymLinkRetry: 2752 2752 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 2753 2753 (void **) &pSMBr); ··· 2812 2812 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 2813 2813 cifs_stats_inc(&tcon->stats.cifs_stats.num_symlinks); 2814 2814 if (rc) 2815 - cFYI(1, "Send error in SetPathInfo create symlink = %d", rc); 2815 + cifs_dbg(FYI, "Send error in SetPathInfo create symlink = %d\n", 2816 + rc); 2816 2817 2817 2818 cifs_buf_release(pSMB); 2818 2819 ··· 2837 2836 int bytes_returned = 0; 2838 2837 __u16 params, param_offset, offset, byte_count; 2839 2838 2840 - cFYI(1, "In Create Hard link Unix style"); 2839 + cifs_dbg(FYI, "In Create Hard link Unix style\n"); 2841 2840 createHardLinkRetry: 2842 2841 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 2843 2842 (void **) &pSMBr); ··· 2899 2898 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 2900 2899 cifs_stats_inc(&tcon->stats.cifs_stats.num_hardlinks); 2901 2900 if (rc) 2902 - cFYI(1, "Send error in SetPathInfo (hard link) = %d", rc); 2901 + cifs_dbg(FYI, "Send error in SetPathInfo (hard link) = %d\n", 2902 + rc); 2903 2903 2904 2904 cifs_buf_release(pSMB); 2905 2905 if (rc == -EAGAIN) ··· 2922 2920 __u16 count; 2923 2921 int remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR; 2924 2922 2925 - cFYI(1, "In CIFSCreateHardLink"); 2923 + cifs_dbg(FYI, "In CIFSCreateHardLink\n"); 2926 2924 winCreateHardLinkRetry: 2927 2925 2928 2926 rc = smb_init(SMB_COM_NT_RENAME, 4, tcon, (void **) &pSMB, ··· 2974 2972 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 2975 2973 cifs_stats_inc(&tcon->stats.cifs_stats.num_hardlinks); 2976 2974 if (rc) 2977 - cFYI(1, "Send error in hard link (NT rename) = %d", rc); 2975 + cifs_dbg(FYI, "Send error in hard link (NT rename) = %d\n", rc); 2978 2976 2979 2977 cifs_buf_release(pSMB); 2980 2978 if (rc == -EAGAIN) ··· 2997 2995 __u16 params, byte_count; 2998 2996 char *data_start; 2999 2997 3000 - cFYI(1, "In QPathSymLinkInfo (Unix) for path %s", searchName); 2998 + cifs_dbg(FYI, "In QPathSymLinkInfo (Unix) for path %s\n", searchName); 3001 2999 3002 3000 querySymLinkRetry: 3003 3001 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, ··· 3044 3042 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 3045 3043 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3046 3044 if (rc) { 3047 - cFYI(1, "Send error in QuerySymLinkInfo = %d", rc); 3045 + cifs_dbg(FYI, "Send error in QuerySymLinkInfo = %d\n", rc); 3048 3046 } else { 3049 3047 /* decode response */ 3050 3048 ··· 3099 3097 struct smb_com_transaction_ioctl_req *pSMB; 3100 3098 struct smb_com_transaction_ioctl_rsp *pSMBr; 3101 3099 3102 - cFYI(1, "In Windows reparse style QueryLink for path %s", searchName); 3100 + cifs_dbg(FYI, "In Windows reparse style QueryLink for path %s\n", 3101 + searchName); 3103 3102 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, 3104 3103 (void **) &pSMBr); 3105 3104 if (rc) ··· 3128 3125 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 3129 3126 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3130 3127 if (rc) { 3131 - cFYI(1, "Send error in QueryReparseLinkInfo = %d", rc); 3128 + cifs_dbg(FYI, "Send error in QueryReparseLinkInfo = %d\n", rc); 3132 3129 } else { /* decode response */ 3133 3130 __u32 data_offset = le32_to_cpu(pSMBr->DataOffset); 3134 3131 __u32 data_count = le32_to_cpu(pSMBr->DataCount); ··· 3152 3149 if ((reparse_buf->LinkNamesBuf + 3153 3150 reparse_buf->TargetNameOffset + 3154 3151 reparse_buf->TargetNameLen) > end_of_smb) { 3155 - cFYI(1, "reparse buf beyond SMB"); 3152 + cifs_dbg(FYI, "reparse buf beyond SMB\n"); 3156 3153 rc = -EIO; 3157 3154 goto qreparse_out; 3158 3155 } ··· 3173 3170 } 3174 3171 } else { 3175 3172 rc = -EIO; 3176 - cFYI(1, "Invalid return data count on " 3177 - "get reparse info ioctl"); 3173 + cifs_dbg(FYI, "Invalid return data count on get reparse info ioctl\n"); 3178 3174 } 3179 3175 symlinkinfo[buflen] = 0; /* just in case so the caller 3180 3176 does not go off the end of the buffer */ 3181 - cFYI(1, "readlink result - %s", symlinkinfo); 3177 + cifs_dbg(FYI, "readlink result - %s\n", symlinkinfo); 3182 3178 } 3183 3179 3184 3180 qreparse_out: ··· 3200 3198 ace->e_perm = cpu_to_le16(cifs_ace->cifs_e_perm); 3201 3199 ace->e_tag = cpu_to_le16(cifs_ace->cifs_e_tag); 3202 3200 ace->e_id = cpu_to_le32(le64_to_cpu(cifs_ace->cifs_uid)); 3203 - /* cFYI(1, "perm %d tag %d id %d",ace->e_perm,ace->e_tag,ace->e_id); */ 3201 + /* 3202 + cifs_dbg(FYI, "perm %d tag %d id %d\n", 3203 + ace->e_perm, ace->e_tag, ace->e_id); 3204 + */ 3204 3205 3205 3206 return; 3206 3207 } ··· 3229 3224 size += sizeof(struct cifs_posix_ace) * count; 3230 3225 /* check if we would go beyond end of SMB */ 3231 3226 if (size_of_data_area < size) { 3232 - cFYI(1, "bad CIFS POSIX ACL size %d vs. %d", 3233 - size_of_data_area, size); 3227 + cifs_dbg(FYI, "bad CIFS POSIX ACL size %d vs. %d\n", 3228 + size_of_data_area, size); 3234 3229 return -EINVAL; 3235 3230 } 3236 3231 } else if (acl_type & ACL_TYPE_DEFAULT) { ··· 3277 3272 cifs_ace->cifs_uid = cpu_to_le64(-1); 3278 3273 } else 3279 3274 cifs_ace->cifs_uid = cpu_to_le64(le32_to_cpu(local_ace->e_id)); 3280 - /*cFYI(1, "perm %d tag %d id %d",ace->e_perm,ace->e_tag,ace->e_id);*/ 3275 + /* 3276 + cifs_dbg(FYI, "perm %d tag %d id %d\n", 3277 + ace->e_perm, ace->e_tag, ace->e_id); 3278 + */ 3281 3279 return rc; 3282 3280 } 3283 3281 ··· 3298 3290 return 0; 3299 3291 3300 3292 count = posix_acl_xattr_count((size_t)buflen); 3301 - cFYI(1, "setting acl with %d entries from buf of length %d and " 3302 - "version of %d", 3303 - count, buflen, le32_to_cpu(local_acl->a_version)); 3293 + cifs_dbg(FYI, "setting acl with %d entries from buf of length %d and version of %d\n", 3294 + count, buflen, le32_to_cpu(local_acl->a_version)); 3304 3295 if (le32_to_cpu(local_acl->a_version) != 2) { 3305 - cFYI(1, "unknown POSIX ACL version %d", 3306 - le32_to_cpu(local_acl->a_version)); 3296 + cifs_dbg(FYI, "unknown POSIX ACL version %d\n", 3297 + le32_to_cpu(local_acl->a_version)); 3307 3298 return 0; 3308 3299 } 3309 3300 cifs_acl->version = cpu_to_le16(1); ··· 3311 3304 else if (acl_type == ACL_TYPE_DEFAULT) 3312 3305 cifs_acl->default_entry_count = cpu_to_le16(count); 3313 3306 else { 3314 - cFYI(1, "unknown ACL type %d", acl_type); 3307 + cifs_dbg(FYI, "unknown ACL type %d\n", acl_type); 3315 3308 return 0; 3316 3309 } 3317 3310 for (i = 0; i < count; i++) { ··· 3344 3337 int name_len; 3345 3338 __u16 params, byte_count; 3346 3339 3347 - cFYI(1, "In GetPosixACL (Unix) for path %s", searchName); 3340 + cifs_dbg(FYI, "In GetPosixACL (Unix) for path %s\n", searchName); 3348 3341 3349 3342 queryAclRetry: 3350 3343 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, ··· 3397 3390 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3398 3391 cifs_stats_inc(&tcon->stats.cifs_stats.num_acl_get); 3399 3392 if (rc) { 3400 - cFYI(1, "Send error in Query POSIX ACL = %d", rc); 3393 + cifs_dbg(FYI, "Send error in Query POSIX ACL = %d\n", rc); 3401 3394 } else { 3402 3395 /* decode response */ 3403 3396 ··· 3434 3427 int bytes_returned = 0; 3435 3428 __u16 params, byte_count, data_count, param_offset, offset; 3436 3429 3437 - cFYI(1, "In SetPosixACL (Unix) for path %s", fileName); 3430 + cifs_dbg(FYI, "In SetPosixACL (Unix) for path %s\n", fileName); 3438 3431 setAclRetry: 3439 3432 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 3440 3433 (void **) &pSMBr); ··· 3489 3482 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 3490 3483 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3491 3484 if (rc) 3492 - cFYI(1, "Set POSIX ACL returned %d", rc); 3485 + cifs_dbg(FYI, "Set POSIX ACL returned %d\n", rc); 3493 3486 3494 3487 setACLerrorExit: 3495 3488 cifs_buf_release(pSMB); ··· 3509 3502 int bytes_returned; 3510 3503 __u16 params, byte_count; 3511 3504 3512 - cFYI(1, "In GetExtAttr"); 3505 + cifs_dbg(FYI, "In GetExtAttr\n"); 3513 3506 if (tcon == NULL) 3514 3507 return -ENODEV; 3515 3508 ··· 3548 3541 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 3549 3542 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3550 3543 if (rc) { 3551 - cFYI(1, "error %d in GetExtAttr", rc); 3544 + cifs_dbg(FYI, "error %d in GetExtAttr\n", rc); 3552 3545 } else { 3553 3546 /* decode response */ 3554 3547 rc = validate_t2((struct smb_t2_rsp *)pSMBr); ··· 3563 3556 struct file_chattr_info *pfinfo; 3564 3557 /* BB Do we need a cast or hash here ? */ 3565 3558 if (count != 16) { 3566 - cFYI(1, "Illegal size ret in GetExtAttr"); 3559 + cifs_dbg(FYI, "Illegal size ret in GetExtAttr\n"); 3567 3560 rc = -EIO; 3568 3561 goto GetExtAttrOut; 3569 3562 } ··· 3651 3644 3652 3645 /* should we also check that parm and data areas do not overlap? */ 3653 3646 if (*ppparm > end_of_smb) { 3654 - cFYI(1, "parms start after end of smb"); 3647 + cifs_dbg(FYI, "parms start after end of smb\n"); 3655 3648 return -EINVAL; 3656 3649 } else if (parm_count + *ppparm > end_of_smb) { 3657 - cFYI(1, "parm end after end of smb"); 3650 + cifs_dbg(FYI, "parm end after end of smb\n"); 3658 3651 return -EINVAL; 3659 3652 } else if (*ppdata > end_of_smb) { 3660 - cFYI(1, "data starts after end of smb"); 3653 + cifs_dbg(FYI, "data starts after end of smb\n"); 3661 3654 return -EINVAL; 3662 3655 } else if (data_count + *ppdata > end_of_smb) { 3663 - cFYI(1, "data %p + count %d (%p) past smb end %p start %p", 3664 - *ppdata, data_count, (data_count + *ppdata), 3665 - end_of_smb, pSMBr); 3656 + cifs_dbg(FYI, "data %p + count %d (%p) past smb end %p start %p\n", 3657 + *ppdata, data_count, (data_count + *ppdata), 3658 + end_of_smb, pSMBr); 3666 3659 return -EINVAL; 3667 3660 } else if (parm_count + data_count > bcc) { 3668 - cFYI(1, "parm count and data count larger than SMB"); 3661 + cifs_dbg(FYI, "parm count and data count larger than SMB\n"); 3669 3662 return -EINVAL; 3670 3663 } 3671 3664 *pdatalen = data_count; ··· 3683 3676 QUERY_SEC_DESC_REQ *pSMB; 3684 3677 struct kvec iov[1]; 3685 3678 3686 - cFYI(1, "GetCifsACL"); 3679 + cifs_dbg(FYI, "GetCifsACL\n"); 3687 3680 3688 3681 *pbuflen = 0; 3689 3682 *acl_inf = NULL; ··· 3708 3701 0); 3709 3702 cifs_stats_inc(&tcon->stats.cifs_stats.num_acl_get); 3710 3703 if (rc) { 3711 - cFYI(1, "Send error in QuerySecDesc = %d", rc); 3704 + cifs_dbg(FYI, "Send error in QuerySecDesc = %d\n", rc); 3712 3705 } else { /* decode response */ 3713 3706 __le32 *parm; 3714 3707 __u32 parm_len; ··· 3723 3716 goto qsec_out; 3724 3717 pSMBr = (struct smb_com_ntransact_rsp *)iov[0].iov_base; 3725 3718 3726 - cFYI(1, "smb %p parm %p data %p", pSMBr, parm, *acl_inf); 3719 + cifs_dbg(FYI, "smb %p parm %p data %p\n", 3720 + pSMBr, parm, *acl_inf); 3727 3721 3728 3722 if (le32_to_cpu(pSMBr->ParameterCount) != 4) { 3729 3723 rc = -EIO; /* bad smb */ ··· 3736 3728 3737 3729 acl_len = le32_to_cpu(*parm); 3738 3730 if (acl_len != *pbuflen) { 3739 - cERROR(1, "acl length %d does not match %d", 3740 - acl_len, *pbuflen); 3731 + cifs_dbg(VFS, "acl length %d does not match %d\n", 3732 + acl_len, *pbuflen); 3741 3733 if (*pbuflen > acl_len) 3742 3734 *pbuflen = acl_len; 3743 3735 } ··· 3746 3738 header followed by the smallest SID */ 3747 3739 if ((*pbuflen < sizeof(struct cifs_ntsd) + 8) || 3748 3740 (*pbuflen >= 64 * 1024)) { 3749 - cERROR(1, "bad acl length %d", *pbuflen); 3741 + cifs_dbg(VFS, "bad acl length %d\n", *pbuflen); 3750 3742 rc = -EINVAL; 3751 3743 *pbuflen = 0; 3752 3744 } else { 3753 - *acl_inf = kmalloc(*pbuflen, GFP_KERNEL); 3745 + *acl_inf = kmemdup(pdata, *pbuflen, GFP_KERNEL); 3754 3746 if (*acl_inf == NULL) { 3755 3747 *pbuflen = 0; 3756 3748 rc = -ENOMEM; 3757 3749 } 3758 - memcpy(*acl_inf, pdata, *pbuflen); 3759 3750 } 3760 3751 } 3761 3752 qsec_out: ··· 3816 3809 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 3817 3810 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3818 3811 3819 - cFYI(1, "SetCIFSACL bytes_returned: %d, rc: %d", bytes_returned, rc); 3812 + cifs_dbg(FYI, "SetCIFSACL bytes_returned: %d, rc: %d\n", 3813 + bytes_returned, rc); 3820 3814 if (rc) 3821 - cFYI(1, "Set CIFS ACL returned %d", rc); 3815 + cifs_dbg(FYI, "Set CIFS ACL returned %d\n", rc); 3822 3816 cifs_buf_release(pSMB); 3823 3817 3824 3818 if (rc == -EAGAIN) ··· 3843 3835 int bytes_returned; 3844 3836 int name_len; 3845 3837 3846 - cFYI(1, "In SMBQPath path %s", search_name); 3838 + cifs_dbg(FYI, "In SMBQPath path %s\n", search_name); 3847 3839 QInfRetry: 3848 3840 rc = smb_init(SMB_COM_QUERY_INFORMATION, 0, tcon, (void **) &pSMB, 3849 3841 (void **) &pSMBr); ··· 3870 3862 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 3871 3863 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3872 3864 if (rc) { 3873 - cFYI(1, "Send error in QueryInfo = %d", rc); 3865 + cifs_dbg(FYI, "Send error in QueryInfo = %d\n", rc); 3874 3866 } else if (data) { 3875 3867 struct timespec ts; 3876 3868 __u32 time = le32_to_cpu(pSMBr->last_write_time); ··· 3944 3936 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 3945 3937 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 3946 3938 if (rc) { 3947 - cFYI(1, "Send error in QPathInfo = %d", rc); 3939 + cifs_dbg(FYI, "Send error in QPathInfo = %d\n", rc); 3948 3940 } else { /* decode response */ 3949 3941 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 3950 3942 ··· 3981 3973 int name_len; 3982 3974 __u16 params, byte_count; 3983 3975 3984 - /* cFYI(1, "In QPathInfo path %s", search_name); */ 3976 + /* cifs_dbg(FYI, "In QPathInfo path %s\n", search_name); */ 3985 3977 QPathInfoRetry: 3986 3978 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 3987 3979 (void **) &pSMBr); ··· 4031 4023 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4032 4024 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4033 4025 if (rc) { 4034 - cFYI(1, "Send error in QPathInfo = %d", rc); 4026 + cifs_dbg(FYI, "Send error in QPathInfo = %d\n", rc); 4035 4027 } else { /* decode response */ 4036 4028 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4037 4029 ··· 4112 4104 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4113 4105 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4114 4106 if (rc) { 4115 - cFYI(1, "Send error in QPathInfo = %d", rc); 4107 + cifs_dbg(FYI, "Send error in QPathInfo = %d\n", rc); 4116 4108 } else { /* decode response */ 4117 4109 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4118 4110 4119 4111 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { 4120 - cERROR(1, "Malformed FILE_UNIX_BASIC_INFO response. " 4121 - "Unix Extensions can be disabled on mount " 4122 - "by specifying the nosfu mount option."); 4112 + cifs_dbg(VFS, "Malformed FILE_UNIX_BASIC_INFO response. Unix Extensions can be disabled on mount by specifying the nosfu mount option.\n"); 4123 4113 rc = -EIO; /* bad smb */ 4124 4114 } else { 4125 4115 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); ··· 4149 4143 int name_len; 4150 4144 __u16 params, byte_count; 4151 4145 4152 - cFYI(1, "In QPathInfo (Unix) the path %s", searchName); 4146 + cifs_dbg(FYI, "In QPathInfo (Unix) the path %s\n", searchName); 4153 4147 UnixQPathInfoRetry: 4154 4148 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 4155 4149 (void **) &pSMBr); ··· 4196 4190 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4197 4191 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4198 4192 if (rc) { 4199 - cFYI(1, "Send error in QPathInfo = %d", rc); 4193 + cifs_dbg(FYI, "Send error in QPathInfo = %d\n", rc); 4200 4194 } else { /* decode response */ 4201 4195 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4202 4196 4203 4197 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { 4204 - cERROR(1, "Malformed FILE_UNIX_BASIC_INFO response. " 4205 - "Unix Extensions can be disabled on mount " 4206 - "by specifying the nosfu mount option."); 4198 + cifs_dbg(VFS, "Malformed FILE_UNIX_BASIC_INFO response. Unix Extensions can be disabled on mount by specifying the nosfu mount option.\n"); 4207 4199 rc = -EIO; /* bad smb */ 4208 4200 } else { 4209 4201 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); ··· 4235 4231 __u16 params, byte_count; 4236 4232 struct nls_table *nls_codepage; 4237 4233 4238 - cFYI(1, "In FindFirst for %s", searchName); 4234 + cifs_dbg(FYI, "In FindFirst for %s\n", searchName); 4239 4235 4240 4236 findFirstRetry: 4241 4237 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, ··· 4318 4314 if (rc) {/* BB add logic to retry regular search if Unix search 4319 4315 rejected unexpectedly by server */ 4320 4316 /* BB Add code to handle unsupported level rc */ 4321 - cFYI(1, "Error in FindFirst = %d", rc); 4317 + cifs_dbg(FYI, "Error in FindFirst = %d\n", rc); 4322 4318 4323 4319 cifs_buf_release(pSMB); 4324 4320 ··· 4356 4352 psrch_inf->entries_in_buffer; 4357 4353 lnoff = le16_to_cpu(parms->LastNameOffset); 4358 4354 if (CIFSMaxBufSize < lnoff) { 4359 - cERROR(1, "ignoring corrupt resume name"); 4355 + cifs_dbg(VFS, "ignoring corrupt resume name\n"); 4360 4356 psrch_inf->last_entry = NULL; 4361 4357 return rc; 4362 4358 } ··· 4387 4383 unsigned int name_len; 4388 4384 __u16 params, byte_count; 4389 4385 4390 - cFYI(1, "In FindNext"); 4386 + cifs_dbg(FYI, "In FindNext\n"); 4391 4387 4392 4388 if (psrch_inf->endOfSearch) 4393 4389 return -ENOENT; ··· 4448 4444 cifs_buf_release(pSMB); 4449 4445 rc = 0; /* search probably was closed at end of search*/ 4450 4446 } else 4451 - cFYI(1, "FindNext returned = %d", rc); 4447 + cifs_dbg(FYI, "FindNext returned = %d\n", rc); 4452 4448 } else { /* decode response */ 4453 4449 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4454 4450 ··· 4483 4479 psrch_inf->entries_in_buffer; 4484 4480 lnoff = le16_to_cpu(parms->LastNameOffset); 4485 4481 if (CIFSMaxBufSize < lnoff) { 4486 - cERROR(1, "ignoring corrupt resume name"); 4482 + cifs_dbg(VFS, "ignoring corrupt resume name\n"); 4487 4483 psrch_inf->last_entry = NULL; 4488 4484 return rc; 4489 4485 } else 4490 4486 psrch_inf->last_entry = 4491 4487 psrch_inf->srch_entries_start + lnoff; 4492 4488 4493 - /* cFYI(1, "fnxt2 entries in buf %d index_of_last %d", 4494 - psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry); */ 4489 + /* cifs_dbg(FYI, "fnxt2 entries in buf %d index_of_last %d\n", 4490 + psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry); */ 4495 4491 4496 4492 /* BB fixme add unlock here */ 4497 4493 } ··· 4516 4512 int rc = 0; 4517 4513 FINDCLOSE_REQ *pSMB = NULL; 4518 4514 4519 - cFYI(1, "In CIFSSMBFindClose"); 4515 + cifs_dbg(FYI, "In CIFSSMBFindClose\n"); 4520 4516 rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); 4521 4517 4522 4518 /* no sense returning error if session restarted ··· 4530 4526 pSMB->ByteCount = 0; 4531 4527 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); 4532 4528 if (rc) 4533 - cERROR(1, "Send error in FindClose = %d", rc); 4529 + cifs_dbg(VFS, "Send error in FindClose = %d\n", rc); 4534 4530 4535 4531 cifs_stats_inc(&tcon->stats.cifs_stats.num_fclose); 4536 4532 ··· 4552 4548 int name_len, bytes_returned; 4553 4549 __u16 params, byte_count; 4554 4550 4555 - cFYI(1, "In GetSrvInodeNum for %s", search_name); 4551 + cifs_dbg(FYI, "In GetSrvInodeNum for %s\n", search_name); 4556 4552 if (tcon == NULL) 4557 4553 return -ENODEV; 4558 4554 ··· 4603 4599 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4604 4600 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4605 4601 if (rc) { 4606 - cFYI(1, "error %d in QueryInternalInfo", rc); 4602 + cifs_dbg(FYI, "error %d in QueryInternalInfo\n", rc); 4607 4603 } else { 4608 4604 /* decode response */ 4609 4605 rc = validate_t2((struct smb_t2_rsp *)pSMBr); ··· 4618 4614 struct file_internal_info *pfinfo; 4619 4615 /* BB Do we need a cast or hash here ? */ 4620 4616 if (count < 8) { 4621 - cFYI(1, "Illegal size ret in QryIntrnlInf"); 4617 + cifs_dbg(FYI, "Illegal size ret in QryIntrnlInf\n"); 4622 4618 rc = -EIO; 4623 4619 goto GetInodeNumOut; 4624 4620 } ··· 4659 4655 *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals); 4660 4656 4661 4657 if (*num_of_nodes < 1) { 4662 - cERROR(1, "num_referrals: must be at least > 0," 4663 - "but we get num_referrals = %d", *num_of_nodes); 4658 + cifs_dbg(VFS, "num_referrals: must be at least > 0, but we get num_referrals = %d\n", 4659 + *num_of_nodes); 4664 4660 rc = -EINVAL; 4665 4661 goto parse_DFS_referrals_exit; 4666 4662 } 4667 4663 4668 4664 ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); 4669 4665 if (ref->VersionNumber != cpu_to_le16(3)) { 4670 - cERROR(1, "Referrals of V%d version are not supported," 4671 - "should be V3", le16_to_cpu(ref->VersionNumber)); 4666 + cifs_dbg(VFS, "Referrals of V%d version are not supported, should be V3\n", 4667 + le16_to_cpu(ref->VersionNumber)); 4672 4668 rc = -EINVAL; 4673 4669 goto parse_DFS_referrals_exit; 4674 4670 } ··· 4677 4673 data_end = (char *)(&(pSMBr->PathConsumed)) + 4678 4674 le16_to_cpu(pSMBr->t2.DataCount); 4679 4675 4680 - cFYI(1, "num_referrals: %d dfs flags: 0x%x ...", 4681 - *num_of_nodes, 4682 - le32_to_cpu(pSMBr->DFSFlags)); 4676 + cifs_dbg(FYI, "num_referrals: %d dfs flags: 0x%x ...\n", 4677 + *num_of_nodes, le32_to_cpu(pSMBr->DFSFlags)); 4683 4678 4684 - *target_nodes = kzalloc(sizeof(struct dfs_info3_param) * 4685 - *num_of_nodes, GFP_KERNEL); 4679 + *target_nodes = kcalloc(*num_of_nodes, sizeof(struct dfs_info3_param), 4680 + GFP_KERNEL); 4686 4681 if (*target_nodes == NULL) { 4687 - cERROR(1, "Failed to allocate buffer for target_nodes"); 4688 4682 rc = -ENOMEM; 4689 4683 goto parse_DFS_referrals_exit; 4690 4684 } ··· 4761 4759 *num_of_nodes = 0; 4762 4760 *target_nodes = NULL; 4763 4761 4764 - cFYI(1, "In GetDFSRefer the path %s", search_name); 4762 + cifs_dbg(FYI, "In GetDFSRefer the path %s\n", search_name); 4765 4763 if (ses == NULL) 4766 4764 return -ENODEV; 4767 4765 getDFSRetry: ··· 4829 4827 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, 4830 4828 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4831 4829 if (rc) { 4832 - cFYI(1, "Send error in GetDFSRefer = %d", rc); 4830 + cifs_dbg(FYI, "Send error in GetDFSRefer = %d\n", rc); 4833 4831 goto GetDFSRefExit; 4834 4832 } 4835 4833 rc = validate_t2((struct smb_t2_rsp *)pSMBr); ··· 4840 4838 goto GetDFSRefExit; 4841 4839 } 4842 4840 4843 - cFYI(1, "Decoding GetDFSRefer response BCC: %d Offset %d", 4844 - get_bcc(&pSMBr->hdr), 4845 - le16_to_cpu(pSMBr->t2.DataOffset)); 4841 + cifs_dbg(FYI, "Decoding GetDFSRefer response BCC: %d Offset %d\n", 4842 + get_bcc(&pSMBr->hdr), le16_to_cpu(pSMBr->t2.DataOffset)); 4846 4843 4847 4844 /* parse returned result into more usable form */ 4848 4845 rc = parse_DFS_referrals(pSMBr, num_of_nodes, ··· 4870 4869 int bytes_returned = 0; 4871 4870 __u16 params, byte_count; 4872 4871 4873 - cFYI(1, "OldQFSInfo"); 4872 + cifs_dbg(FYI, "OldQFSInfo\n"); 4874 4873 oldQFSInfoRetry: 4875 4874 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 4876 4875 (void **) &pSMBr); ··· 4903 4902 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4904 4903 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4905 4904 if (rc) { 4906 - cFYI(1, "Send error in QFSInfo = %d", rc); 4905 + cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); 4907 4906 } else { /* decode response */ 4908 4907 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4909 4908 ··· 4911 4910 rc = -EIO; /* bad smb */ 4912 4911 else { 4913 4912 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); 4914 - cFYI(1, "qfsinf resp BCC: %d Offset %d", 4913 + cifs_dbg(FYI, "qfsinf resp BCC: %d Offset %d\n", 4915 4914 get_bcc(&pSMBr->hdr), data_offset); 4916 4915 4917 4916 response_data = (FILE_SYSTEM_ALLOC_INFO *) ··· 4924 4923 le32_to_cpu(response_data->TotalAllocationUnits); 4925 4924 FSData->f_bfree = FSData->f_bavail = 4926 4925 le32_to_cpu(response_data->FreeAllocationUnits); 4927 - cFYI(1, "Blocks: %lld Free: %lld Block size %ld", 4928 - (unsigned long long)FSData->f_blocks, 4929 - (unsigned long long)FSData->f_bfree, 4930 - FSData->f_bsize); 4926 + cifs_dbg(FYI, "Blocks: %lld Free: %lld Block size %ld\n", 4927 + (unsigned long long)FSData->f_blocks, 4928 + (unsigned long long)FSData->f_bfree, 4929 + FSData->f_bsize); 4931 4930 } 4932 4931 } 4933 4932 cifs_buf_release(pSMB); ··· 4950 4949 int bytes_returned = 0; 4951 4950 __u16 params, byte_count; 4952 4951 4953 - cFYI(1, "In QFSInfo"); 4952 + cifs_dbg(FYI, "In QFSInfo\n"); 4954 4953 QFSInfoRetry: 4955 4954 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 4956 4955 (void **) &pSMBr); ··· 4983 4982 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 4984 4983 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4985 4984 if (rc) { 4986 - cFYI(1, "Send error in QFSInfo = %d", rc); 4985 + cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); 4987 4986 } else { /* decode response */ 4988 4987 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4989 4988 ··· 5004 5003 le64_to_cpu(response_data->TotalAllocationUnits); 5005 5004 FSData->f_bfree = FSData->f_bavail = 5006 5005 le64_to_cpu(response_data->FreeAllocationUnits); 5007 - cFYI(1, "Blocks: %lld Free: %lld Block size %ld", 5008 - (unsigned long long)FSData->f_blocks, 5009 - (unsigned long long)FSData->f_bfree, 5010 - FSData->f_bsize); 5006 + cifs_dbg(FYI, "Blocks: %lld Free: %lld Block size %ld\n", 5007 + (unsigned long long)FSData->f_blocks, 5008 + (unsigned long long)FSData->f_bfree, 5009 + FSData->f_bsize); 5011 5010 } 5012 5011 } 5013 5012 cifs_buf_release(pSMB); ··· 5029 5028 int bytes_returned = 0; 5030 5029 __u16 params, byte_count; 5031 5030 5032 - cFYI(1, "In QFSAttributeInfo"); 5031 + cifs_dbg(FYI, "In QFSAttributeInfo\n"); 5033 5032 QFSAttributeRetry: 5034 5033 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 5035 5034 (void **) &pSMBr); ··· 5063 5062 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5064 5063 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5065 5064 if (rc) { 5066 - cERROR(1, "Send error in QFSAttributeInfo = %d", rc); 5065 + cifs_dbg(VFS, "Send error in QFSAttributeInfo = %d\n", rc); 5067 5066 } else { /* decode response */ 5068 5067 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 5069 5068 ··· 5099 5098 int bytes_returned = 0; 5100 5099 __u16 params, byte_count; 5101 5100 5102 - cFYI(1, "In QFSDeviceInfo"); 5101 + cifs_dbg(FYI, "In QFSDeviceInfo\n"); 5103 5102 QFSDeviceRetry: 5104 5103 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 5105 5104 (void **) &pSMBr); ··· 5134 5133 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5135 5134 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5136 5135 if (rc) { 5137 - cFYI(1, "Send error in QFSDeviceInfo = %d", rc); 5136 + cifs_dbg(FYI, "Send error in QFSDeviceInfo = %d\n", rc); 5138 5137 } else { /* decode response */ 5139 5138 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 5140 5139 ··· 5170 5169 int bytes_returned = 0; 5171 5170 __u16 params, byte_count; 5172 5171 5173 - cFYI(1, "In QFSUnixInfo"); 5172 + cifs_dbg(FYI, "In QFSUnixInfo\n"); 5174 5173 QFSUnixRetry: 5175 5174 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, 5176 5175 (void **) &pSMB, (void **) &pSMBr); ··· 5204 5203 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5205 5204 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5206 5205 if (rc) { 5207 - cERROR(1, "Send error in QFSUnixInfo = %d", rc); 5206 + cifs_dbg(VFS, "Send error in QFSUnixInfo = %d\n", rc); 5208 5207 } else { /* decode response */ 5209 5208 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 5210 5209 ··· 5239 5238 int bytes_returned = 0; 5240 5239 __u16 params, param_offset, offset, byte_count; 5241 5240 5242 - cFYI(1, "In SETFSUnixInfo"); 5241 + cifs_dbg(FYI, "In SETFSUnixInfo\n"); 5243 5242 SETFSUnixRetry: 5244 5243 /* BB switch to small buf init to save memory */ 5245 5244 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, ··· 5287 5286 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5288 5287 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5289 5288 if (rc) { 5290 - cERROR(1, "Send error in SETFSUnixInfo = %d", rc); 5289 + cifs_dbg(VFS, "Send error in SETFSUnixInfo = %d\n", rc); 5291 5290 } else { /* decode response */ 5292 5291 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 5293 5292 if (rc) ··· 5315 5314 int bytes_returned = 0; 5316 5315 __u16 params, byte_count; 5317 5316 5318 - cFYI(1, "In QFSPosixInfo"); 5317 + cifs_dbg(FYI, "In QFSPosixInfo\n"); 5319 5318 QFSPosixRetry: 5320 5319 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 5321 5320 (void **) &pSMBr); ··· 5349 5348 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5350 5349 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5351 5350 if (rc) { 5352 - cFYI(1, "Send error in QFSUnixInfo = %d", rc); 5351 + cifs_dbg(FYI, "Send error in QFSUnixInfo = %d\n", rc); 5353 5352 } else { /* decode response */ 5354 5353 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 5355 5354 ··· 5411 5410 5412 5411 __u16 params, byte_count, data_count, param_offset, offset; 5413 5412 5414 - cFYI(1, "In SetEOF"); 5413 + cifs_dbg(FYI, "In SetEOF\n"); 5415 5414 SetEOFRetry: 5416 5415 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 5417 5416 (void **) &pSMBr); ··· 5477 5476 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5478 5477 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5479 5478 if (rc) 5480 - cFYI(1, "SetPathInfo (file size) returned %d", rc); 5479 + cifs_dbg(FYI, "SetPathInfo (file size) returned %d\n", rc); 5481 5480 5482 5481 cifs_buf_release(pSMB); 5483 5482 ··· 5496 5495 int rc = 0; 5497 5496 __u16 params, param_offset, offset, byte_count, count; 5498 5497 5499 - cFYI(1, "SetFileSize (via SetFileInfo) %lld", 5500 - (long long)size); 5498 + cifs_dbg(FYI, "SetFileSize (via SetFileInfo) %lld\n", 5499 + (long long)size); 5501 5500 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); 5502 5501 5503 5502 if (rc) ··· 5554 5553 pSMB->ByteCount = cpu_to_le16(byte_count); 5555 5554 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); 5556 5555 if (rc) { 5557 - cFYI(1, "Send error in SetFileInfo (SetFileSize) = %d", rc); 5556 + cifs_dbg(FYI, "Send error in SetFileInfo (SetFileSize) = %d\n", 5557 + rc); 5558 5558 } 5559 5559 5560 5560 /* Note: On -EAGAIN error only caller can retry on handle based calls ··· 5579 5577 int rc = 0; 5580 5578 __u16 params, param_offset, offset, byte_count, count; 5581 5579 5582 - cFYI(1, "Set Times (via SetFileInfo)"); 5580 + cifs_dbg(FYI, "Set Times (via SetFileInfo)\n"); 5583 5581 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); 5584 5582 5585 5583 if (rc) ··· 5625 5623 memcpy(data_offset, data, sizeof(FILE_BASIC_INFO)); 5626 5624 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); 5627 5625 if (rc) 5628 - cFYI(1, "Send error in Set Time (SetFileInfo) = %d", rc); 5626 + cifs_dbg(FYI, "Send error in Set Time (SetFileInfo) = %d\n", 5627 + rc); 5629 5628 5630 5629 /* Note: On -EAGAIN error only caller can retry on handle based calls 5631 5630 since file handle passed in no longer valid */ ··· 5643 5640 int rc = 0; 5644 5641 __u16 params, param_offset, offset, byte_count, count; 5645 5642 5646 - cFYI(1, "Set File Disposition (via SetFileInfo)"); 5643 + cifs_dbg(FYI, "Set File Disposition (via SetFileInfo)\n"); 5647 5644 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); 5648 5645 5649 5646 if (rc) ··· 5685 5682 *data_offset = delete_file ? 1 : 0; 5686 5683 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); 5687 5684 if (rc) 5688 - cFYI(1, "Send error in SetFileDisposition = %d", rc); 5685 + cifs_dbg(FYI, "Send error in SetFileDisposition = %d\n", rc); 5689 5686 5690 5687 return rc; 5691 5688 } ··· 5703 5700 char *data_offset; 5704 5701 __u16 params, param_offset, offset, byte_count, count; 5705 5702 5706 - cFYI(1, "In SetTimes"); 5703 + cifs_dbg(FYI, "In SetTimes\n"); 5707 5704 5708 5705 SetTimesRetry: 5709 5706 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, ··· 5759 5756 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5760 5757 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5761 5758 if (rc) 5762 - cFYI(1, "SetPathInfo (times) returned %d", rc); 5759 + cifs_dbg(FYI, "SetPathInfo (times) returned %d\n", rc); 5763 5760 5764 5761 cifs_buf_release(pSMB); 5765 5762 ··· 5784 5781 int bytes_returned; 5785 5782 int name_len; 5786 5783 5787 - cFYI(1, "In SetAttrLegacy"); 5784 + cifs_dbg(FYI, "In SetAttrLegacy\n"); 5788 5785 5789 5786 SetAttrLgcyRetry: 5790 5787 rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB, ··· 5810 5807 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 5811 5808 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 5812 5809 if (rc) 5813 - cFYI(1, "Error in LegacySetAttr = %d", rc); 5810 + cifs_dbg(FYI, "Error in LegacySetAttr = %d\n", rc); 5814 5811 5815 5812 cifs_buf_release(pSMB); 5816 5813 ··· 5878 5875 int rc = 0; 5879 5876 u16 params, param_offset, offset, byte_count, count; 5880 5877 5881 - cFYI(1, "Set Unix Info (via SetFileInfo)"); 5878 + cifs_dbg(FYI, "Set Unix Info (via SetFileInfo)\n"); 5882 5879 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); 5883 5880 5884 5881 if (rc) ··· 5924 5921 5925 5922 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); 5926 5923 if (rc) 5927 - cFYI(1, "Send error in Set Time (SetFileInfo) = %d", rc); 5924 + cifs_dbg(FYI, "Send error in Set Time (SetFileInfo) = %d\n", 5925 + rc); 5928 5926 5929 5927 /* Note: On -EAGAIN error only caller can retry on handle based calls 5930 5928 since file handle passed in no longer valid */ ··· 5947 5943 FILE_UNIX_BASIC_INFO *data_offset; 5948 5944 __u16 params, param_offset, offset, count, byte_count; 5949 5945 5950 - cFYI(1, "In SetUID/GID/Mode"); 5946 + cifs_dbg(FYI, "In SetUID/GID/Mode\n"); 5951 5947 setPermsRetry: 5952 5948 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 5953 5949 (void **) &pSMBr); ··· 6003 5999 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 6004 6000 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 6005 6001 if (rc) 6006 - cFYI(1, "SetPathInfo (perms) returned %d", rc); 6002 + cifs_dbg(FYI, "SetPathInfo (perms) returned %d\n", rc); 6007 6003 6008 6004 cifs_buf_release(pSMB); 6009 6005 if (rc == -EAGAIN) ··· 6040 6036 __u16 params, byte_count, data_offset; 6041 6037 unsigned int ea_name_len = ea_name ? strlen(ea_name) : 0; 6042 6038 6043 - cFYI(1, "In Query All EAs path %s", searchName); 6039 + cifs_dbg(FYI, "In Query All EAs path %s\n", searchName); 6044 6040 QAllEAsRetry: 6045 6041 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 6046 6042 (void **) &pSMBr); ··· 6087 6083 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 6088 6084 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 6089 6085 if (rc) { 6090 - cFYI(1, "Send error in QueryAllEAs = %d", rc); 6086 + cifs_dbg(FYI, "Send error in QueryAllEAs = %d\n", rc); 6091 6087 goto QAllEAsOut; 6092 6088 } 6093 6089 ··· 6115 6111 (((char *) &pSMBr->hdr.Protocol) + data_offset); 6116 6112 6117 6113 list_len = le32_to_cpu(ea_response_data->list_len); 6118 - cFYI(1, "ea length %d", list_len); 6114 + cifs_dbg(FYI, "ea length %d\n", list_len); 6119 6115 if (list_len <= 8) { 6120 - cFYI(1, "empty EA list returned from server"); 6116 + cifs_dbg(FYI, "empty EA list returned from server\n"); 6121 6117 goto QAllEAsOut; 6122 6118 } 6123 6119 6124 6120 /* make sure list_len doesn't go past end of SMB */ 6125 6121 end_of_smb = (char *)pByteArea(&pSMBr->hdr) + get_bcc(&pSMBr->hdr); 6126 6122 if ((char *)ea_response_data + list_len > end_of_smb) { 6127 - cFYI(1, "EA list appears to go beyond SMB"); 6123 + cifs_dbg(FYI, "EA list appears to go beyond SMB\n"); 6128 6124 rc = -EIO; 6129 6125 goto QAllEAsOut; 6130 6126 } ··· 6141 6137 temp_ptr += 4; 6142 6138 /* make sure we can read name_len and value_len */ 6143 6139 if (list_len < 0) { 6144 - cFYI(1, "EA entry goes beyond length of list"); 6140 + cifs_dbg(FYI, "EA entry goes beyond length of list\n"); 6145 6141 rc = -EIO; 6146 6142 goto QAllEAsOut; 6147 6143 } ··· 6150 6146 value_len = le16_to_cpu(temp_fea->value_len); 6151 6147 list_len -= name_len + 1 + value_len; 6152 6148 if (list_len < 0) { 6153 - cFYI(1, "EA entry goes beyond length of list"); 6149 + cifs_dbg(FYI, "EA entry goes beyond length of list\n"); 6154 6150 rc = -EIO; 6155 6151 goto QAllEAsOut; 6156 6152 } ··· 6218 6214 int bytes_returned = 0; 6219 6215 __u16 params, param_offset, byte_count, offset, count; 6220 6216 6221 - cFYI(1, "In SetEA"); 6217 + cifs_dbg(FYI, "In SetEA\n"); 6222 6218 SetEARetry: 6223 6219 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 6224 6220 (void **) &pSMBr); ··· 6300 6296 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, 6301 6297 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 6302 6298 if (rc) 6303 - cFYI(1, "SetPathInfo (EA) returned %d", rc); 6299 + cifs_dbg(FYI, "SetPathInfo (EA) returned %d\n", rc); 6304 6300 6305 6301 cifs_buf_release(pSMB); 6306 6302 ··· 6343 6339 struct dir_notify_req *dnotify_req; 6344 6340 int bytes_returned; 6345 6341 6346 - cFYI(1, "In CIFSSMBNotify for file handle %d", (int)netfid); 6342 + cifs_dbg(FYI, "In CIFSSMBNotify for file handle %d\n", (int)netfid); 6347 6343 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, 6348 6344 (void **) &pSMBr); 6349 6345 if (rc) ··· 6372 6368 (struct smb_hdr *)pSMBr, &bytes_returned, 6373 6369 CIFS_ASYNC_OP); 6374 6370 if (rc) { 6375 - cFYI(1, "Error in Notify = %d", rc); 6371 + cifs_dbg(FYI, "Error in Notify = %d\n", rc); 6376 6372 } else { 6377 6373 /* Add file to outstanding requests */ 6378 6374 /* BB change to kmem cache alloc */
+155 -213
fs/cifs/connect.c
··· 95 95 96 96 /* Mount options which take string value */ 97 97 Opt_user, Opt_pass, Opt_ip, 98 - Opt_unc, Opt_domain, 99 - Opt_srcaddr, Opt_prefixpath, 100 - Opt_iocharset, 98 + Opt_domain, Opt_srcaddr, Opt_iocharset, 101 99 Opt_netbiosname, Opt_servern, 102 100 Opt_ver, Opt_vers, Opt_sec, Opt_cache, 103 101 ··· 191 193 { Opt_blank_ip, "addr=" }, 192 194 { Opt_ip, "ip=%s" }, 193 195 { Opt_ip, "addr=%s" }, 194 - { Opt_unc, "unc=%s" }, 195 - { Opt_unc, "target=%s" }, 196 - { Opt_unc, "path=%s" }, 196 + { Opt_ignore, "unc=%s" }, 197 + { Opt_ignore, "target=%s" }, 198 + { Opt_ignore, "path=%s" }, 197 199 { Opt_domain, "dom=%s" }, 198 200 { Opt_domain, "domain=%s" }, 199 201 { Opt_domain, "workgroup=%s" }, 200 202 { Opt_srcaddr, "srcaddr=%s" }, 201 - { Opt_prefixpath, "prefixpath=%s" }, 203 + { Opt_ignore, "prefixpath=%s" }, 202 204 { Opt_iocharset, "iocharset=%s" }, 203 205 { Opt_netbiosname, "netbiosname=%s" }, 204 206 { Opt_servern, "servern=%s" }, ··· 316 318 server->max_read = 0; 317 319 #endif 318 320 319 - cFYI(1, "Reconnecting tcp session"); 321 + cifs_dbg(FYI, "Reconnecting tcp session\n"); 320 322 321 323 /* before reconnecting the tcp session, mark the smb session (uid) 322 324 and the tid bad so they are not used until reconnected */ 323 - cFYI(1, "%s: marking sessions and tcons for reconnect", __func__); 325 + cifs_dbg(FYI, "%s: marking sessions and tcons for reconnect\n", 326 + __func__); 324 327 spin_lock(&cifs_tcp_ses_lock); 325 328 list_for_each(tmp, &server->smb_ses_list) { 326 329 ses = list_entry(tmp, struct cifs_ses, smb_ses_list); ··· 335 336 spin_unlock(&cifs_tcp_ses_lock); 336 337 337 338 /* do not want to be sending data on a socket we are freeing */ 338 - cFYI(1, "%s: tearing down socket", __func__); 339 + cifs_dbg(FYI, "%s: tearing down socket\n", __func__); 339 340 mutex_lock(&server->srv_mutex); 340 341 if (server->ssocket) { 341 - cFYI(1, "State: 0x%x Flags: 0x%lx", server->ssocket->state, 342 - server->ssocket->flags); 342 + cifs_dbg(FYI, "State: 0x%x Flags: 0x%lx\n", 343 + server->ssocket->state, server->ssocket->flags); 343 344 kernel_sock_shutdown(server->ssocket, SHUT_WR); 344 - cFYI(1, "Post shutdown state: 0x%x Flags: 0x%lx", 345 - server->ssocket->state, 346 - server->ssocket->flags); 345 + cifs_dbg(FYI, "Post shutdown state: 0x%x Flags: 0x%lx\n", 346 + server->ssocket->state, server->ssocket->flags); 347 347 sock_release(server->ssocket); 348 348 server->ssocket = NULL; 349 349 } ··· 356 358 357 359 /* mark submitted MIDs for retry and issue callback */ 358 360 INIT_LIST_HEAD(&retry_list); 359 - cFYI(1, "%s: moving mids to private list", __func__); 361 + cifs_dbg(FYI, "%s: moving mids to private list\n", __func__); 360 362 spin_lock(&GlobalMid_Lock); 361 363 list_for_each_safe(tmp, tmp2, &server->pending_mid_q) { 362 364 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); ··· 366 368 } 367 369 spin_unlock(&GlobalMid_Lock); 368 370 369 - cFYI(1, "%s: issuing mid callbacks", __func__); 371 + cifs_dbg(FYI, "%s: issuing mid callbacks\n", __func__); 370 372 list_for_each_safe(tmp, tmp2, &retry_list) { 371 373 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 372 374 list_del_init(&mid_entry->qhead); ··· 379 381 /* we should try only the port we connected to before */ 380 382 rc = generic_ip_connect(server); 381 383 if (rc) { 382 - cFYI(1, "reconnect error %d", rc); 384 + cifs_dbg(FYI, "reconnect error %d\n", rc); 383 385 msleep(3000); 384 386 } else { 385 387 atomic_inc(&tcpSesReconnectCount); ··· 413 415 414 416 rc = server->ops->echo ? server->ops->echo(server) : -ENOSYS; 415 417 if (rc) 416 - cFYI(1, "Unable to send echo request to server: %s", 417 - server->hostname); 418 + cifs_dbg(FYI, "Unable to send echo request to server: %s\n", 419 + server->hostname); 418 420 419 421 requeue_echo: 420 422 queue_delayed_work(cifsiod_wq, &server->echo, SMB_ECHO_INTERVAL); ··· 426 428 if (!server->bigbuf) { 427 429 server->bigbuf = (char *)cifs_buf_get(); 428 430 if (!server->bigbuf) { 429 - cERROR(1, "No memory for large SMB response"); 431 + cifs_dbg(VFS, "No memory for large SMB response\n"); 430 432 msleep(3000); 431 433 /* retry will check if exiting */ 432 434 return false; ··· 439 441 if (!server->smallbuf) { 440 442 server->smallbuf = (char *)cifs_small_buf_get(); 441 443 if (!server->smallbuf) { 442 - cERROR(1, "No memory for SMB response"); 444 + cifs_dbg(VFS, "No memory for SMB response\n"); 443 445 msleep(1000); 444 446 /* retry will check if exiting */ 445 447 return false; ··· 469 471 */ 470 472 if (server->tcpStatus == CifsGood && 471 473 time_after(jiffies, server->lstrp + 2 * SMB_ECHO_INTERVAL)) { 472 - cERROR(1, "Server %s has not responded in %d seconds. " 473 - "Reconnecting...", server->hostname, 474 - (2 * SMB_ECHO_INTERVAL) / HZ); 474 + cifs_dbg(VFS, "Server %s has not responded in %d seconds. Reconnecting...\n", 475 + server->hostname, (2 * SMB_ECHO_INTERVAL) / HZ); 475 476 cifs_reconnect(server); 476 477 wake_up(&server->response_q); 477 478 return true; ··· 581 584 length = 0; 582 585 continue; 583 586 } else if (length <= 0) { 584 - cFYI(1, "Received no data or error: expecting %d " 585 - "got %d", to_read, length); 587 + cifs_dbg(FYI, "Received no data or error: expecting %d\n" 588 + "got %d", to_read, length); 586 589 cifs_reconnect(server); 587 590 total_read = -EAGAIN; 588 591 break; ··· 616 619 /* Regular SMB response */ 617 620 return true; 618 621 case RFC1002_SESSION_KEEP_ALIVE: 619 - cFYI(1, "RFC 1002 session keep alive"); 622 + cifs_dbg(FYI, "RFC 1002 session keep alive\n"); 620 623 break; 621 624 case RFC1002_POSITIVE_SESSION_RESPONSE: 622 - cFYI(1, "RFC 1002 positive session response"); 625 + cifs_dbg(FYI, "RFC 1002 positive session response\n"); 623 626 break; 624 627 case RFC1002_NEGATIVE_SESSION_RESPONSE: 625 628 /* 626 629 * We get this from Windows 98 instead of an error on 627 630 * SMB negprot response. 628 631 */ 629 - cFYI(1, "RFC 1002 negative session response"); 632 + cifs_dbg(FYI, "RFC 1002 negative session response\n"); 630 633 /* give server a second to clean up */ 631 634 msleep(1000); 632 635 /* ··· 640 643 wake_up(&server->response_q); 641 644 break; 642 645 default: 643 - cERROR(1, "RFC 1002 unknown response type 0x%x", type); 646 + cifs_dbg(VFS, "RFC 1002 unknown response type 0x%x\n", type); 644 647 cifs_reconnect(server); 645 648 } 646 649 ··· 726 729 spin_lock(&GlobalMid_Lock); 727 730 list_for_each_safe(tmp, tmp2, &server->pending_mid_q) { 728 731 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 729 - cFYI(1, "Clearing mid 0x%llx", mid_entry->mid); 732 + cifs_dbg(FYI, "Clearing mid 0x%llx\n", mid_entry->mid); 730 733 mid_entry->mid_state = MID_SHUTDOWN; 731 734 list_move(&mid_entry->qhead, &dispose_list); 732 735 } ··· 735 738 /* now walk dispose list and issue callbacks */ 736 739 list_for_each_safe(tmp, tmp2, &dispose_list) { 737 740 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 738 - cFYI(1, "Callback mid 0x%llx", mid_entry->mid); 741 + cifs_dbg(FYI, "Callback mid 0x%llx\n", mid_entry->mid); 739 742 list_del_init(&mid_entry->qhead); 740 743 mid_entry->callback(mid_entry); 741 744 } ··· 752 755 * least 45 seconds before giving up on a request getting a 753 756 * response and going ahead and killing cifsd. 754 757 */ 755 - cFYI(1, "Wait for exit from demultiplex thread"); 758 + cifs_dbg(FYI, "Wait for exit from demultiplex thread\n"); 756 759 msleep(46000); 757 760 /* 758 761 * If threads still have not exited they are probably never ··· 779 782 780 783 /* make sure this will fit in a large buffer */ 781 784 if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server) - 4) { 782 - cERROR(1, "SMB response too long (%u bytes)", 783 - pdu_length); 785 + cifs_dbg(VFS, "SMB response too long (%u bytes)\n", pdu_length); 784 786 cifs_reconnect(server); 785 787 wake_up(&server->response_q); 786 788 return -EAGAIN; ··· 837 841 struct mid_q_entry *mid_entry; 838 842 839 843 current->flags |= PF_MEMALLOC; 840 - cFYI(1, "Demultiplex PID: %d", task_pid_nr(current)); 844 + cifs_dbg(FYI, "Demultiplex PID: %d\n", task_pid_nr(current)); 841 845 842 846 length = atomic_inc_return(&tcpSesAllocCount); 843 847 if (length > 1) ··· 867 871 */ 868 872 pdu_length = get_rfc1002_length(buf); 869 873 870 - cFYI(1, "RFC1002 header 0x%x", pdu_length); 874 + cifs_dbg(FYI, "RFC1002 header 0x%x\n", pdu_length); 871 875 if (!is_smb_response(server, buf[0])) 872 876 continue; 873 877 874 878 /* make sure we have enough to get to the MID */ 875 879 if (pdu_length < HEADER_SIZE(server) - 1 - 4) { 876 - cERROR(1, "SMB response too short (%u bytes)", 877 - pdu_length); 880 + cifs_dbg(VFS, "SMB response too short (%u bytes)\n", 881 + pdu_length); 878 882 cifs_reconnect(server); 879 883 wake_up(&server->response_q); 880 884 continue; ··· 906 910 mid_entry->callback(mid_entry); 907 911 } else if (!server->ops->is_oplock_break || 908 912 !server->ops->is_oplock_break(buf, server)) { 909 - cERROR(1, "No task to wake, unknown frame received! " 910 - "NumMids %d", atomic_read(&midCount)); 913 + cifs_dbg(VFS, "No task to wake, unknown frame received! NumMids %d\n", 914 + atomic_read(&midCount)); 911 915 cifs_dump_mem("Received Data is: ", buf, 912 916 HEADER_SIZE(server)); 913 917 #ifdef CONFIG_CIFS_DEBUG2 ··· 1033 1037 break; 1034 1038 case Opt_sec_krb5p: 1035 1039 /* vol->secFlg |= CIFSSEC_MUST_SEAL | CIFSSEC_MAY_KRB5; */ 1036 - cERROR(1, "Krb5 cifs privacy not supported"); 1040 + cifs_dbg(VFS, "Krb5 cifs privacy not supported\n"); 1037 1041 break; 1038 1042 case Opt_sec_ntlmssp: 1039 1043 vol->secFlg |= CIFSSEC_MAY_NTLMSSP; ··· 1063 1067 vol->nullauth = 1; 1064 1068 break; 1065 1069 default: 1066 - cERROR(1, "bad security option: %s", value); 1070 + cifs_dbg(VFS, "bad security option: %s\n", value); 1067 1071 return 1; 1068 1072 } 1069 1073 ··· 1089 1093 vol->strict_io = false; 1090 1094 break; 1091 1095 default: 1092 - cERROR(1, "bad cache= option: %s", value); 1096 + cifs_dbg(VFS, "bad cache= option: %s\n", value); 1093 1097 return 1; 1094 1098 } 1095 1099 return 0; ··· 1120 1124 break; 1121 1125 #endif 1122 1126 default: 1123 - cERROR(1, "Unknown vers= option specified: %s", value); 1127 + cifs_dbg(VFS, "Unknown vers= option specified: %s\n", value); 1124 1128 return 1; 1125 1129 } 1126 1130 return 0; ··· 1251 1255 separator[0] = options[4]; 1252 1256 options += 5; 1253 1257 } else { 1254 - cFYI(1, "Null separator not allowed"); 1258 + cifs_dbg(FYI, "Null separator not allowed\n"); 1255 1259 } 1256 1260 } 1257 1261 vol->backupuid_specified = false; /* no backup intent for a user */ ··· 1436 1440 break; 1437 1441 case Opt_fsc: 1438 1442 #ifndef CONFIG_CIFS_FSCACHE 1439 - cERROR(1, "FS-Cache support needs CONFIG_CIFS_FSCACHE " 1440 - "kernel config option set"); 1443 + cifs_dbg(VFS, "FS-Cache support needs CONFIG_CIFS_FSCACHE kernel config option set\n"); 1441 1444 goto cifs_parse_mount_err; 1442 1445 #endif 1443 1446 vol->fsc = true; ··· 1454 1459 /* Numeric Values */ 1455 1460 case Opt_backupuid: 1456 1461 if (get_option_uid(args, &vol->backupuid)) { 1457 - cERROR(1, "%s: Invalid backupuid value", 1458 - __func__); 1462 + cifs_dbg(VFS, "%s: Invalid backupuid value\n", 1463 + __func__); 1459 1464 goto cifs_parse_mount_err; 1460 1465 } 1461 1466 vol->backupuid_specified = true; 1462 1467 break; 1463 1468 case Opt_backupgid: 1464 1469 if (get_option_gid(args, &vol->backupgid)) { 1465 - cERROR(1, "%s: Invalid backupgid value", 1466 - __func__); 1470 + cifs_dbg(VFS, "%s: Invalid backupgid value\n", 1471 + __func__); 1467 1472 goto cifs_parse_mount_err; 1468 1473 } 1469 1474 vol->backupgid_specified = true; 1470 1475 break; 1471 1476 case Opt_uid: 1472 1477 if (get_option_uid(args, &vol->linux_uid)) { 1473 - cERROR(1, "%s: Invalid uid value", 1474 - __func__); 1478 + cifs_dbg(VFS, "%s: Invalid uid value\n", 1479 + __func__); 1475 1480 goto cifs_parse_mount_err; 1476 1481 } 1477 1482 uid_specified = true; 1478 1483 break; 1479 1484 case Opt_cruid: 1480 1485 if (get_option_uid(args, &vol->cred_uid)) { 1481 - cERROR(1, "%s: Invalid cruid value", 1482 - __func__); 1486 + cifs_dbg(VFS, "%s: Invalid cruid value\n", 1487 + __func__); 1483 1488 goto cifs_parse_mount_err; 1484 1489 } 1485 1490 break; 1486 1491 case Opt_gid: 1487 1492 if (get_option_gid(args, &vol->linux_gid)) { 1488 - cERROR(1, "%s: Invalid gid value", 1489 - __func__); 1493 + cifs_dbg(VFS, "%s: Invalid gid value\n", 1494 + __func__); 1490 1495 goto cifs_parse_mount_err; 1491 1496 } 1492 1497 gid_specified = true; 1493 1498 break; 1494 1499 case Opt_file_mode: 1495 1500 if (get_option_ul(args, &option)) { 1496 - cERROR(1, "%s: Invalid file_mode value", 1497 - __func__); 1501 + cifs_dbg(VFS, "%s: Invalid file_mode value\n", 1502 + __func__); 1498 1503 goto cifs_parse_mount_err; 1499 1504 } 1500 1505 vol->file_mode = option; 1501 1506 break; 1502 1507 case Opt_dirmode: 1503 1508 if (get_option_ul(args, &option)) { 1504 - cERROR(1, "%s: Invalid dir_mode value", 1505 - __func__); 1509 + cifs_dbg(VFS, "%s: Invalid dir_mode value\n", 1510 + __func__); 1506 1511 goto cifs_parse_mount_err; 1507 1512 } 1508 1513 vol->dir_mode = option; ··· 1510 1515 case Opt_port: 1511 1516 if (get_option_ul(args, &option) || 1512 1517 option > USHRT_MAX) { 1513 - cERROR(1, "%s: Invalid port value", __func__); 1518 + cifs_dbg(VFS, "%s: Invalid port value\n", 1519 + __func__); 1514 1520 goto cifs_parse_mount_err; 1515 1521 } 1516 1522 port = (unsigned short)option; 1517 1523 break; 1518 1524 case Opt_rsize: 1519 1525 if (get_option_ul(args, &option)) { 1520 - cERROR(1, "%s: Invalid rsize value", 1521 - __func__); 1526 + cifs_dbg(VFS, "%s: Invalid rsize value\n", 1527 + __func__); 1522 1528 goto cifs_parse_mount_err; 1523 1529 } 1524 1530 vol->rsize = option; 1525 1531 break; 1526 1532 case Opt_wsize: 1527 1533 if (get_option_ul(args, &option)) { 1528 - cERROR(1, "%s: Invalid wsize value", 1529 - __func__); 1534 + cifs_dbg(VFS, "%s: Invalid wsize value\n", 1535 + __func__); 1530 1536 goto cifs_parse_mount_err; 1531 1537 } 1532 1538 vol->wsize = option; 1533 1539 break; 1534 1540 case Opt_actimeo: 1535 1541 if (get_option_ul(args, &option)) { 1536 - cERROR(1, "%s: Invalid actimeo value", 1537 - __func__); 1542 + cifs_dbg(VFS, "%s: Invalid actimeo value\n", 1543 + __func__); 1538 1544 goto cifs_parse_mount_err; 1539 1545 } 1540 1546 vol->actimeo = HZ * option; 1541 1547 if (vol->actimeo > CIFS_MAX_ACTIMEO) { 1542 - cERROR(1, "CIFS: attribute cache" 1543 - "timeout too large"); 1548 + cifs_dbg(VFS, "attribute cache timeout too large\n"); 1544 1549 goto cifs_parse_mount_err; 1545 1550 } 1546 1551 break; ··· 1563 1568 goto cifs_parse_mount_err; 1564 1569 } 1565 1570 vol->username = kstrdup(string, GFP_KERNEL); 1566 - if (!vol->username) { 1567 - printk(KERN_WARNING "CIFS: no memory " 1568 - "for username\n"); 1571 + if (!vol->username) 1569 1572 goto cifs_parse_mount_err; 1570 - } 1571 1573 break; 1572 1574 case Opt_blank_pass: 1573 1575 /* passwords have to be handled differently ··· 1652 1660 } 1653 1661 got_ip = true; 1654 1662 break; 1655 - case Opt_unc: 1656 - string = vol->UNC; 1657 - vol->UNC = match_strdup(args); 1658 - if (vol->UNC == NULL) 1659 - goto out_nomem; 1660 - 1661 - convert_delimiter(vol->UNC, '\\'); 1662 - if (vol->UNC[0] != '\\' || vol->UNC[1] != '\\') { 1663 - printk(KERN_ERR "CIFS: UNC Path does not " 1664 - "begin with // or \\\\\n"); 1665 - goto cifs_parse_mount_err; 1666 - } 1667 - 1668 - /* Compare old unc= option to new one */ 1669 - if (!string || strcmp(string, vol->UNC)) 1670 - printk(KERN_WARNING "CIFS: the value of the " 1671 - "unc= mount option does not match the " 1672 - "device string. Using the unc= option " 1673 - "for now. In 3.10, that option will " 1674 - "be ignored and the contents of the " 1675 - "device string will be used " 1676 - "instead. (%s != %s)\n", string, 1677 - vol->UNC); 1678 - break; 1679 1663 case Opt_domain: 1680 1664 string = match_strdup(args); 1681 1665 if (string == NULL) ··· 1669 1701 "for domainname\n"); 1670 1702 goto cifs_parse_mount_err; 1671 1703 } 1672 - cFYI(1, "Domain name set"); 1704 + cifs_dbg(FYI, "Domain name set\n"); 1673 1705 break; 1674 1706 case Opt_srcaddr: 1675 1707 string = match_strdup(args); ··· 1683 1715 " srcaddr: %s\n", string); 1684 1716 goto cifs_parse_mount_err; 1685 1717 } 1686 - break; 1687 - case Opt_prefixpath: 1688 - /* skip over any leading delimiter */ 1689 - if (*args[0].from == '/' || *args[0].from == '\\') 1690 - args[0].from++; 1691 - 1692 - string = vol->prepath; 1693 - vol->prepath = match_strdup(args); 1694 - if (vol->prepath == NULL) 1695 - goto out_nomem; 1696 - /* Compare old prefixpath= option to new one */ 1697 - if (!string || strcmp(string, vol->prepath)) 1698 - printk(KERN_WARNING "CIFS: the value of the " 1699 - "prefixpath= mount option does not " 1700 - "match the device string. Using the " 1701 - "prefixpath= option for now. In 3.10, " 1702 - "that option will be ignored and the " 1703 - "contents of the device string will be " 1704 - "used instead.(%s != %s)\n", string, 1705 - vol->prepath); 1706 1718 break; 1707 1719 case Opt_iocharset: 1708 1720 string = match_strdup(args); ··· 1707 1759 /* if iocharset not set then load_nls_default 1708 1760 * is used by caller 1709 1761 */ 1710 - cFYI(1, "iocharset set to %s", string); 1762 + cifs_dbg(FYI, "iocharset set to %s\n", string); 1711 1763 break; 1712 1764 case Opt_netbiosname: 1713 1765 string = match_strdup(args); ··· 1821 1873 #ifndef CONFIG_KEYS 1822 1874 /* Muliuser mounts require CONFIG_KEYS support */ 1823 1875 if (vol->multiuser) { 1824 - cERROR(1, "Multiuser mounts require kernels with " 1825 - "CONFIG_KEYS enabled."); 1876 + cifs_dbg(VFS, "Multiuser mounts require kernels with CONFIG_KEYS enabled\n"); 1826 1877 goto cifs_parse_mount_err; 1827 1878 } 1828 1879 #endif 1829 1880 if (!vol->UNC) { 1830 - cERROR(1, "CIFS mount error: No usable UNC path provided in " 1831 - "device string or in unc= option!"); 1881 + cifs_dbg(VFS, "CIFS mount error: No usable UNC path provided in device string or in unc= option!\n"); 1832 1882 goto cifs_parse_mount_err; 1833 1883 } 1834 1884 1835 1885 /* make sure UNC has a share name */ 1836 1886 if (!strchr(vol->UNC + 3, '\\')) { 1837 - cERROR(1, "Malformed UNC. Unable to find share name."); 1887 + cifs_dbg(VFS, "Malformed UNC. Unable to find share name.\n"); 1838 1888 goto cifs_parse_mount_err; 1839 1889 } 1840 1890 ··· 2053 2107 2054 2108 ++server->srv_count; 2055 2109 spin_unlock(&cifs_tcp_ses_lock); 2056 - cFYI(1, "Existing tcp session with server found"); 2110 + cifs_dbg(FYI, "Existing tcp session with server found\n"); 2057 2111 return server; 2058 2112 } 2059 2113 spin_unlock(&cifs_tcp_ses_lock); ··· 2100 2154 struct TCP_Server_Info *tcp_ses = NULL; 2101 2155 int rc; 2102 2156 2103 - cFYI(1, "UNC: %s", volume_info->UNC); 2157 + cifs_dbg(FYI, "UNC: %s\n", volume_info->UNC); 2104 2158 2105 2159 /* see if we already have a matching tcp_ses */ 2106 2160 tcp_ses = cifs_find_tcp_session(volume_info); ··· 2115 2169 2116 2170 rc = cifs_crypto_shash_allocate(tcp_ses); 2117 2171 if (rc) { 2118 - cERROR(1, "could not setup hash structures rc %d", rc); 2172 + cifs_dbg(VFS, "could not setup hash structures rc %d\n", rc); 2119 2173 goto out_err; 2120 2174 } 2121 2175 ··· 2162 2216 2163 2217 rc = ip_connect(tcp_ses); 2164 2218 if (rc < 0) { 2165 - cERROR(1, "Error connecting to socket. Aborting operation"); 2219 + cifs_dbg(VFS, "Error connecting to socket. Aborting operation.\n"); 2166 2220 goto out_err_crypto_release; 2167 2221 } 2168 2222 ··· 2175 2229 tcp_ses, "cifsd"); 2176 2230 if (IS_ERR(tcp_ses->tsk)) { 2177 2231 rc = PTR_ERR(tcp_ses->tsk); 2178 - cERROR(1, "error %d create cifsd thread", rc); 2232 + cifs_dbg(VFS, "error %d create cifsd thread\n", rc); 2179 2233 module_put(THIS_MODULE); 2180 2234 goto out_err_crypto_release; 2181 2235 } ··· 2262 2316 unsigned int xid; 2263 2317 struct TCP_Server_Info *server = ses->server; 2264 2318 2265 - cFYI(1, "%s: ses_count=%d", __func__, ses->ses_count); 2319 + cifs_dbg(FYI, "%s: ses_count=%d\n", __func__, ses->ses_count); 2266 2320 spin_lock(&cifs_tcp_ses_lock); 2267 2321 if (--ses->ses_count > 0) { 2268 2322 spin_unlock(&cifs_tcp_ses_lock); ··· 2314 2368 sprintf(desc, "cifs:a:%pI6c", &sa6->sin6_addr.s6_addr); 2315 2369 break; 2316 2370 default: 2317 - cFYI(1, "Bad ss_family (%hu)", server->dstaddr.ss_family); 2371 + cifs_dbg(FYI, "Bad ss_family (%hu)\n", 2372 + server->dstaddr.ss_family); 2318 2373 rc = -EINVAL; 2319 2374 goto out_err; 2320 2375 } 2321 2376 2322 - cFYI(1, "%s: desc=%s", __func__, desc); 2377 + cifs_dbg(FYI, "%s: desc=%s\n", __func__, desc); 2323 2378 key = request_key(&key_type_logon, desc, ""); 2324 2379 if (IS_ERR(key)) { 2325 2380 if (!ses->domainName) { 2326 - cFYI(1, "domainName is NULL"); 2381 + cifs_dbg(FYI, "domainName is NULL\n"); 2327 2382 rc = PTR_ERR(key); 2328 2383 goto out_err; 2329 2384 } 2330 2385 2331 2386 /* didn't work, try to find a domain key */ 2332 2387 sprintf(desc, "cifs:d:%s", ses->domainName); 2333 - cFYI(1, "%s: desc=%s", __func__, desc); 2388 + cifs_dbg(FYI, "%s: desc=%s\n", __func__, desc); 2334 2389 key = request_key(&key_type_logon, desc, ""); 2335 2390 if (IS_ERR(key)) { 2336 2391 rc = PTR_ERR(key); ··· 2349 2402 /* find first : in payload */ 2350 2403 payload = (char *)upayload->data; 2351 2404 delim = strnchr(payload, upayload->datalen, ':'); 2352 - cFYI(1, "payload=%s", payload); 2405 + cifs_dbg(FYI, "payload=%s\n", payload); 2353 2406 if (!delim) { 2354 - cFYI(1, "Unable to find ':' in payload (datalen=%d)", 2355 - upayload->datalen); 2407 + cifs_dbg(FYI, "Unable to find ':' in payload (datalen=%d)\n", 2408 + upayload->datalen); 2356 2409 rc = -EINVAL; 2357 2410 goto out_key_put; 2358 2411 } 2359 2412 2360 2413 len = delim - payload; 2361 2414 if (len > MAX_USERNAME_SIZE || len <= 0) { 2362 - cFYI(1, "Bad value from username search (len=%zd)", len); 2415 + cifs_dbg(FYI, "Bad value from username search (len=%zd)\n", 2416 + len); 2363 2417 rc = -EINVAL; 2364 2418 goto out_key_put; 2365 2419 } 2366 2420 2367 2421 vol->username = kstrndup(payload, len, GFP_KERNEL); 2368 2422 if (!vol->username) { 2369 - cFYI(1, "Unable to allocate %zd bytes for username", len); 2423 + cifs_dbg(FYI, "Unable to allocate %zd bytes for username\n", 2424 + len); 2370 2425 rc = -ENOMEM; 2371 2426 goto out_key_put; 2372 2427 } 2373 - cFYI(1, "%s: username=%s", __func__, vol->username); 2428 + cifs_dbg(FYI, "%s: username=%s\n", __func__, vol->username); 2374 2429 2375 2430 len = key->datalen - (len + 1); 2376 2431 if (len > MAX_PASSWORD_SIZE || len <= 0) { 2377 - cFYI(1, "Bad len for password search (len=%zd)", len); 2432 + cifs_dbg(FYI, "Bad len for password search (len=%zd)\n", len); 2378 2433 rc = -EINVAL; 2379 2434 kfree(vol->username); 2380 2435 vol->username = NULL; ··· 2386 2437 ++delim; 2387 2438 vol->password = kstrndup(delim, len, GFP_KERNEL); 2388 2439 if (!vol->password) { 2389 - cFYI(1, "Unable to allocate %zd bytes for password", len); 2440 + cifs_dbg(FYI, "Unable to allocate %zd bytes for password\n", 2441 + len); 2390 2442 rc = -ENOMEM; 2391 2443 kfree(vol->username); 2392 2444 vol->username = NULL; ··· 2399 2449 key_put(key); 2400 2450 out_err: 2401 2451 kfree(desc); 2402 - cFYI(1, "%s: returning %d", __func__, rc); 2452 + cifs_dbg(FYI, "%s: returning %d\n", __func__, rc); 2403 2453 return rc; 2404 2454 } 2405 2455 #else /* ! CONFIG_KEYS */ ··· 2424 2474 2425 2475 ses = cifs_find_smb_ses(server, volume_info); 2426 2476 if (ses) { 2427 - cFYI(1, "Existing smb sess found (status=%d)", ses->status); 2477 + cifs_dbg(FYI, "Existing smb sess found (status=%d)\n", 2478 + ses->status); 2428 2479 2429 2480 mutex_lock(&ses->session_mutex); 2430 2481 rc = cifs_negotiate_protocol(xid, ses); ··· 2437 2486 return ERR_PTR(rc); 2438 2487 } 2439 2488 if (ses->need_reconnect) { 2440 - cFYI(1, "Session needs reconnect"); 2489 + cifs_dbg(FYI, "Session needs reconnect\n"); 2441 2490 rc = cifs_setup_session(xid, ses, 2442 2491 volume_info->local_nls); 2443 2492 if (rc) { ··· 2456 2505 return ses; 2457 2506 } 2458 2507 2459 - cFYI(1, "Existing smb sess not found"); 2508 + cifs_dbg(FYI, "Existing smb sess not found\n"); 2460 2509 ses = sesInfoAlloc(); 2461 2510 if (ses == NULL) 2462 2511 goto get_ses_fail; ··· 2546 2595 unsigned int xid; 2547 2596 struct cifs_ses *ses = tcon->ses; 2548 2597 2549 - cFYI(1, "%s: tc_count=%d", __func__, tcon->tc_count); 2598 + cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); 2550 2599 spin_lock(&cifs_tcp_ses_lock); 2551 2600 if (--tcon->tc_count > 0) { 2552 2601 spin_unlock(&cifs_tcp_ses_lock); ··· 2574 2623 2575 2624 tcon = cifs_find_tcon(ses, volume_info->UNC); 2576 2625 if (tcon) { 2577 - cFYI(1, "Found match on UNC path"); 2626 + cifs_dbg(FYI, "Found match on UNC path\n"); 2578 2627 /* existing tcon already has a reference */ 2579 2628 cifs_put_smb_ses(ses); 2580 2629 if (tcon->seal != volume_info->seal) 2581 - cERROR(1, "transport encryption setting " 2582 - "conflicts with existing tid"); 2630 + cifs_dbg(VFS, "transport encryption setting conflicts with existing tid\n"); 2583 2631 return tcon; 2584 2632 } 2585 2633 ··· 2610 2660 rc = ses->server->ops->tree_connect(xid, ses, volume_info->UNC, tcon, 2611 2661 volume_info->local_nls); 2612 2662 free_xid(xid); 2613 - cFYI(1, "Tcon rc = %d", rc); 2663 + cifs_dbg(FYI, "Tcon rc = %d\n", rc); 2614 2664 if (rc) 2615 2665 goto out_fail; 2616 2666 2617 2667 if (volume_info->nodfs) { 2618 2668 tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; 2619 - cFYI(1, "DFS disabled (%d)", tcon->Flags); 2669 + cifs_dbg(FYI, "DFS disabled (%d)\n", tcon->Flags); 2620 2670 } 2621 2671 tcon->seal = volume_info->seal; 2622 2672 /* ··· 2770 2820 strcpy(temp_unc + 2 + strlen(ses->serverName), "\\IPC$"); 2771 2821 rc = ses->server->ops->tree_connect(xid, ses, temp_unc, NULL, 2772 2822 nls_codepage); 2773 - cFYI(1, "Tcon rc = %d ipc_tid = %d", rc, ses->ipc_tid); 2823 + cifs_dbg(FYI, "Tcon rc = %d ipc_tid = %d\n", rc, ses->ipc_tid); 2774 2824 kfree(temp_unc); 2775 2825 } 2776 2826 if (rc == 0) ··· 2848 2898 saddr4 = (struct sockaddr_in *)&server->srcaddr; 2849 2899 saddr6 = (struct sockaddr_in6 *)&server->srcaddr; 2850 2900 if (saddr6->sin6_family == AF_INET6) 2851 - cERROR(1, "cifs: " 2852 - "Failed to bind to: %pI6c, error: %d", 2853 - &saddr6->sin6_addr, rc); 2901 + cifs_dbg(VFS, "Failed to bind to: %pI6c, error: %d\n", 2902 + &saddr6->sin6_addr, rc); 2854 2903 else 2855 - cERROR(1, "cifs: " 2856 - "Failed to bind to: %pI4, error: %d", 2857 - &saddr4->sin_addr.s_addr, rc); 2904 + cifs_dbg(VFS, "Failed to bind to: %pI4, error: %d\n", 2905 + &saddr4->sin_addr.s_addr, rc); 2858 2906 } 2859 2907 } 2860 2908 return rc; ··· 2957 3009 rc = __sock_create(cifs_net_ns(server), sfamily, SOCK_STREAM, 2958 3010 IPPROTO_TCP, &socket, 1); 2959 3011 if (rc < 0) { 2960 - cERROR(1, "Error %d creating socket", rc); 3012 + cifs_dbg(VFS, "Error %d creating socket\n", rc); 2961 3013 server->ssocket = NULL; 2962 3014 return rc; 2963 3015 } 2964 3016 2965 3017 /* BB other socket options to set KEEPALIVE, NODELAY? */ 2966 - cFYI(1, "Socket created"); 3018 + cifs_dbg(FYI, "Socket created\n"); 2967 3019 server->ssocket = socket; 2968 3020 socket->sk->sk_allocation = GFP_NOFS; 2969 3021 if (sfamily == AF_INET6) ··· 2997 3049 rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, 2998 3050 (char *)&val, sizeof(val)); 2999 3051 if (rc) 3000 - cFYI(1, "set TCP_NODELAY socket option error %d", rc); 3052 + cifs_dbg(FYI, "set TCP_NODELAY socket option error %d\n", 3053 + rc); 3001 3054 } 3002 3055 3003 - cFYI(1, "sndbuf %d rcvbuf %d rcvtimeo 0x%lx", 3056 + cifs_dbg(FYI, "sndbuf %d rcvbuf %d rcvtimeo 0x%lx\n", 3004 3057 socket->sk->sk_sndbuf, 3005 3058 socket->sk->sk_rcvbuf, socket->sk->sk_rcvtimeo); 3006 3059 3007 3060 rc = socket->ops->connect(socket, saddr, slen, 0); 3008 3061 if (rc < 0) { 3009 - cFYI(1, "Error %d connecting to server", rc); 3062 + cifs_dbg(FYI, "Error %d connecting to server\n", rc); 3010 3063 sock_release(socket); 3011 3064 server->ssocket = NULL; 3012 3065 return rc; ··· 3065 3116 if (vol_info && vol_info->no_linux_ext) { 3066 3117 tcon->fsUnixInfo.Capability = 0; 3067 3118 tcon->unix_ext = 0; /* Unix Extensions disabled */ 3068 - cFYI(1, "Linux protocol extensions disabled"); 3119 + cifs_dbg(FYI, "Linux protocol extensions disabled\n"); 3069 3120 return; 3070 3121 } else if (vol_info) 3071 3122 tcon->unix_ext = 1; /* Unix Extensions supported */ 3072 3123 3073 3124 if (tcon->unix_ext == 0) { 3074 - cFYI(1, "Unix extensions disabled so not set on reconnect"); 3125 + cifs_dbg(FYI, "Unix extensions disabled so not set on reconnect\n"); 3075 3126 return; 3076 3127 } 3077 3128 3078 3129 if (!CIFSSMBQFSUnixInfo(xid, tcon)) { 3079 3130 __u64 cap = le64_to_cpu(tcon->fsUnixInfo.Capability); 3080 - cFYI(1, "unix caps which server supports %lld", cap); 3131 + cifs_dbg(FYI, "unix caps which server supports %lld\n", cap); 3081 3132 /* check for reconnect case in which we do not 3082 3133 want to change the mount behavior if we can avoid it */ 3083 3134 if (vol_info == NULL) { ··· 3087 3138 cap &= ~CIFS_UNIX_POSIX_ACL_CAP; 3088 3139 if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { 3089 3140 if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) 3090 - cERROR(1, "POSIXPATH support change"); 3141 + cifs_dbg(VFS, "POSIXPATH support change\n"); 3091 3142 cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; 3092 3143 } else if ((cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { 3093 - cERROR(1, "possible reconnect error"); 3094 - cERROR(1, "server disabled POSIX path support"); 3144 + cifs_dbg(VFS, "possible reconnect error\n"); 3145 + cifs_dbg(VFS, "server disabled POSIX path support\n"); 3095 3146 } 3096 3147 } 3097 3148 3098 3149 if (cap & CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP) 3099 - cERROR(1, "per-share encryption not supported yet"); 3150 + cifs_dbg(VFS, "per-share encryption not supported yet\n"); 3100 3151 3101 3152 cap &= CIFS_UNIX_CAP_MASK; 3102 3153 if (vol_info && vol_info->no_psx_acl) 3103 3154 cap &= ~CIFS_UNIX_POSIX_ACL_CAP; 3104 3155 else if (CIFS_UNIX_POSIX_ACL_CAP & cap) { 3105 - cFYI(1, "negotiated posix acl support"); 3156 + cifs_dbg(FYI, "negotiated posix acl support\n"); 3106 3157 if (cifs_sb) 3107 3158 cifs_sb->mnt_cifs_flags |= 3108 3159 CIFS_MOUNT_POSIXACL; ··· 3111 3162 if (vol_info && vol_info->posix_paths == 0) 3112 3163 cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; 3113 3164 else if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) { 3114 - cFYI(1, "negotiate posix pathnames"); 3165 + cifs_dbg(FYI, "negotiate posix pathnames\n"); 3115 3166 if (cifs_sb) 3116 3167 cifs_sb->mnt_cifs_flags |= 3117 3168 CIFS_MOUNT_POSIX_PATHS; 3118 3169 } 3119 3170 3120 - cFYI(1, "Negotiate caps 0x%x", (int)cap); 3171 + cifs_dbg(FYI, "Negotiate caps 0x%x\n", (int)cap); 3121 3172 #ifdef CONFIG_CIFS_DEBUG2 3122 3173 if (cap & CIFS_UNIX_FCNTL_CAP) 3123 - cFYI(1, "FCNTL cap"); 3174 + cifs_dbg(FYI, "FCNTL cap\n"); 3124 3175 if (cap & CIFS_UNIX_EXTATTR_CAP) 3125 - cFYI(1, "EXTATTR cap"); 3176 + cifs_dbg(FYI, "EXTATTR cap\n"); 3126 3177 if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) 3127 - cFYI(1, "POSIX path cap"); 3178 + cifs_dbg(FYI, "POSIX path cap\n"); 3128 3179 if (cap & CIFS_UNIX_XATTR_CAP) 3129 - cFYI(1, "XATTR cap"); 3180 + cifs_dbg(FYI, "XATTR cap\n"); 3130 3181 if (cap & CIFS_UNIX_POSIX_ACL_CAP) 3131 - cFYI(1, "POSIX ACL cap"); 3182 + cifs_dbg(FYI, "POSIX ACL cap\n"); 3132 3183 if (cap & CIFS_UNIX_LARGE_READ_CAP) 3133 - cFYI(1, "very large read cap"); 3184 + cifs_dbg(FYI, "very large read cap\n"); 3134 3185 if (cap & CIFS_UNIX_LARGE_WRITE_CAP) 3135 - cFYI(1, "very large write cap"); 3186 + cifs_dbg(FYI, "very large write cap\n"); 3136 3187 if (cap & CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP) 3137 - cFYI(1, "transport encryption cap"); 3188 + cifs_dbg(FYI, "transport encryption cap\n"); 3138 3189 if (cap & CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP) 3139 - cFYI(1, "mandatory transport encryption cap"); 3190 + cifs_dbg(FYI, "mandatory transport encryption cap\n"); 3140 3191 #endif /* CIFS_DEBUG2 */ 3141 3192 if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { 3142 3193 if (vol_info == NULL) { 3143 - cFYI(1, "resetting capabilities failed"); 3194 + cifs_dbg(FYI, "resetting capabilities failed\n"); 3144 3195 } else 3145 - cERROR(1, "Negotiating Unix capabilities " 3146 - "with the server failed. Consider " 3147 - "mounting with the Unix Extensions " 3148 - "disabled if problems are found " 3149 - "by specifying the nounix mount " 3150 - "option."); 3196 + cifs_dbg(VFS, "Negotiating Unix capabilities with the server failed. Consider mounting with the Unix Extensions disabled if problems are found by specifying the nounix mount option.\n"); 3151 3197 3152 3198 } 3153 3199 } ··· 3167 3223 cifs_sb->mnt_gid = pvolume_info->linux_gid; 3168 3224 cifs_sb->mnt_file_mode = pvolume_info->file_mode; 3169 3225 cifs_sb->mnt_dir_mode = pvolume_info->dir_mode; 3170 - cFYI(1, "file mode: 0x%hx dir mode: 0x%hx", 3171 - cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); 3226 + cifs_dbg(FYI, "file mode: 0x%hx dir mode: 0x%hx\n", 3227 + cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); 3172 3228 3173 3229 cifs_sb->actimeo = pvolume_info->actimeo; 3174 3230 cifs_sb->local_nls = pvolume_info->local_nls; ··· 3217 3273 if (pvolume_info->strict_io) 3218 3274 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_STRICT_IO; 3219 3275 if (pvolume_info->direct_io) { 3220 - cFYI(1, "mounting share using direct i/o"); 3276 + cifs_dbg(FYI, "mounting share using direct i/o\n"); 3221 3277 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; 3222 3278 } 3223 3279 if (pvolume_info->mfsymlinks) { 3224 3280 if (pvolume_info->sfu_emul) { 3225 - cERROR(1, "mount option mfsymlinks ignored if sfu " 3226 - "mount option is used"); 3281 + cifs_dbg(VFS, "mount option mfsymlinks ignored if sfu mount option is used\n"); 3227 3282 } else { 3228 3283 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MF_SYMLINKS; 3229 3284 } 3230 3285 } 3231 3286 3232 3287 if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm)) 3233 - cERROR(1, "mount option dynperm ignored if cifsacl " 3234 - "mount option supported"); 3288 + cifs_dbg(VFS, "mount option dynperm ignored if cifsacl mount option supported\n"); 3235 3289 } 3236 3290 3237 3291 static void ··· 3281 3339 3282 3340 *pos = '\0'; /* add trailing null */ 3283 3341 convert_delimiter(full_path, CIFS_DIR_SEP(cifs_sb)); 3284 - cFYI(1, "%s: full_path=%s", __func__, full_path); 3342 + cifs_dbg(FYI, "%s: full_path=%s\n", __func__, full_path); 3285 3343 return full_path; 3286 3344 } 3287 3345 ··· 3352 3410 return -EINVAL; 3353 3411 3354 3412 if (volume_info->nullauth) { 3355 - cFYI(1, "Anonymous login"); 3413 + cifs_dbg(FYI, "Anonymous login\n"); 3356 3414 kfree(volume_info->username); 3357 3415 volume_info->username = NULL; 3358 3416 } else if (volume_info->username) { 3359 3417 /* BB fixme parse for domain name here */ 3360 - cFYI(1, "Username: %s", volume_info->username); 3418 + cifs_dbg(FYI, "Username: %s\n", volume_info->username); 3361 3419 } else { 3362 - cifserror("No username specified"); 3420 + cifs_dbg(VFS, "No username specified\n"); 3363 3421 /* In userspace mount helper we can get user name from alternate 3364 3422 locations such as env variables and files on disk */ 3365 3423 return -EINVAL; ··· 3372 3430 } else { 3373 3431 volume_info->local_nls = load_nls(volume_info->iocharset); 3374 3432 if (volume_info->local_nls == NULL) { 3375 - cERROR(1, "CIFS mount error: iocharset %s not found", 3433 + cifs_dbg(VFS, "CIFS mount error: iocharset %s not found\n", 3376 3434 volume_info->iocharset); 3377 3435 return -ELIBACC; 3378 3436 } ··· 3722 3780 if (length == 3) { 3723 3781 if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') && 3724 3782 (bcc_ptr[2] == 'C')) { 3725 - cFYI(1, "IPC connection"); 3783 + cifs_dbg(FYI, "IPC connection\n"); 3726 3784 tcon->ipc = 1; 3727 3785 } 3728 3786 } else if (length == 2) { 3729 3787 if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) { 3730 3788 /* the most common case */ 3731 - cFYI(1, "disk share connection"); 3789 + cifs_dbg(FYI, "disk share connection\n"); 3732 3790 } 3733 3791 } 3734 3792 bcc_ptr += length + 1; ··· 3741 3799 bytes_left, is_unicode, 3742 3800 nls_codepage); 3743 3801 3744 - cFYI(1, "nativeFileSystem=%s", tcon->nativeFileSystem); 3802 + cifs_dbg(FYI, "nativeFileSystem=%s\n", tcon->nativeFileSystem); 3745 3803 3746 3804 if ((smb_buffer_response->WordCount == 3) || 3747 3805 (smb_buffer_response->WordCount == 7)) ··· 3749 3807 tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport); 3750 3808 else 3751 3809 tcon->Flags = 0; 3752 - cFYI(1, "Tcon flags: 0x%x ", tcon->Flags); 3810 + cifs_dbg(FYI, "Tcon flags: 0x%x\n", tcon->Flags); 3753 3811 } else if ((rc == 0) && tcon == NULL) { 3754 3812 /* all we need to save for IPC$ connection */ 3755 3813 ses->ipc_tid = smb_buffer_response->Tid; ··· 3827 3885 if (linuxExtEnabled == 0) 3828 3886 ses->capabilities &= (~server->vals->cap_unix); 3829 3887 3830 - cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", 3888 + cifs_dbg(FYI, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d\n", 3831 3889 server->sec_mode, server->capabilities, server->timeAdj); 3832 3890 3833 3891 if (server->ops->sess_setup) 3834 3892 rc = server->ops->sess_setup(xid, ses, nls_info); 3835 3893 3836 3894 if (rc) { 3837 - cERROR(1, "Send error in SessSetup = %d", rc); 3895 + cifs_dbg(VFS, "Send error in SessSetup = %d\n", rc); 3838 3896 } else { 3839 - mutex_lock(&ses->server->srv_mutex); 3897 + mutex_lock(&server->srv_mutex); 3840 3898 if (!server->session_estab) { 3841 3899 server->session_key.response = ses->auth_key.response; 3842 3900 server->session_key.len = ses->auth_key.len; ··· 3846 3904 } 3847 3905 mutex_unlock(&server->srv_mutex); 3848 3906 3849 - cFYI(1, "CIFS Session Established successfully"); 3907 + cifs_dbg(FYI, "CIFS Session Established successfully\n"); 3850 3908 spin_lock(&GlobalMid_Lock); 3851 3909 ses->status = CifsGood; 3852 3910 ses->need_reconnect = false;
+26 -22
fs/cifs/dir.c
··· 102 102 namelen += (1 + temp->d_name.len); 103 103 temp = temp->d_parent; 104 104 if (temp == NULL) { 105 - cERROR(1, "corrupt dentry"); 105 + cifs_dbg(VFS, "corrupt dentry\n"); 106 106 rcu_read_unlock(); 107 107 return NULL; 108 108 } ··· 124 124 full_path[namelen] = dirsep; 125 125 strncpy(full_path + namelen + 1, temp->d_name.name, 126 126 temp->d_name.len); 127 - cFYI(0, "name: %s", full_path + namelen); 127 + cifs_dbg(FYI, "name: %s\n", full_path + namelen); 128 128 } 129 129 spin_unlock(&temp->d_lock); 130 130 temp = temp->d_parent; 131 131 if (temp == NULL) { 132 - cERROR(1, "corrupt dentry"); 132 + cifs_dbg(VFS, "corrupt dentry\n"); 133 133 rcu_read_unlock(); 134 134 kfree(full_path); 135 135 return NULL; ··· 137 137 } 138 138 rcu_read_unlock(); 139 139 if (namelen != dfsplen || read_seqretry(&rename_lock, seq)) { 140 - cFYI(1, "did not end path lookup where expected. namelen=%d " 141 - "dfsplen=%d", namelen, dfsplen); 140 + cifs_dbg(FYI, "did not end path lookup where expected. namelen=%ddfsplen=%d\n", 141 + namelen, dfsplen); 142 142 /* presumably this is only possible if racing with a rename 143 143 of one of the parent directories (we can not lock the dentries 144 144 above us to prevent this, but retrying should be harmless) */ ··· 178 178 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) { 179 179 for (i = 0; i < direntry->d_name.len; i++) { 180 180 if (direntry->d_name.name[i] == '\\') { 181 - cFYI(1, "Invalid file name"); 181 + cifs_dbg(FYI, "Invalid file name\n"); 182 182 return -EINVAL; 183 183 } 184 184 } ··· 291 291 else if ((oflags & O_CREAT) == O_CREAT) 292 292 disposition = FILE_OPEN_IF; 293 293 else 294 - cFYI(1, "Create flag not set in create function"); 294 + cifs_dbg(FYI, "Create flag not set in create function\n"); 295 295 296 296 /* 297 297 * BB add processing to set equivalent of mode - e.g. via CreateX with ··· 323 323 desired_access, create_options, fid, oplock, 324 324 buf, cifs_sb); 325 325 if (rc) { 326 - cFYI(1, "cifs_create returned 0x%x", rc); 326 + cifs_dbg(FYI, "cifs_create returned 0x%x\n", rc); 327 327 goto out; 328 328 } 329 329 ··· 389 389 390 390 cifs_create_set_dentry: 391 391 if (rc != 0) { 392 - cFYI(1, "Create worked, get_inode_info failed rc = %d", rc); 392 + cifs_dbg(FYI, "Create worked, get_inode_info failed rc = %d\n", 393 + rc); 393 394 if (server->ops->close) 394 395 server->ops->close(xid, tcon, fid); 395 396 goto out; ··· 453 452 454 453 xid = get_xid(); 455 454 456 - cFYI(1, "parent inode = 0x%p name is: %s and dentry = 0x%p", 457 - inode, direntry->d_name.name, direntry); 455 + cifs_dbg(FYI, "parent inode = 0x%p name is: %s and dentry = 0x%p\n", 456 + inode, direntry->d_name.name, direntry); 458 457 459 458 tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb)); 460 - if (IS_ERR(tlink)) 459 + if (IS_ERR(tlink)) { 460 + rc = PTR_ERR(tlink); 461 461 goto out_free_xid; 462 + } 462 463 463 464 tcon = tlink_tcon(tlink); 464 465 server = tcon->ses->server; ··· 521 518 __u32 oplock; 522 519 int created = FILE_CREATED; 523 520 524 - cFYI(1, "cifs_create parent inode = 0x%p name is: %s and dentry = 0x%p", 525 - inode, direntry->d_name.name, direntry); 521 + cifs_dbg(FYI, "cifs_create parent inode = 0x%p name is: %s and dentry = 0x%p\n", 522 + inode, direntry->d_name.name, direntry); 526 523 527 524 tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb)); 528 525 rc = PTR_ERR(tlink); ··· 616 613 goto mknod_out; 617 614 618 615 619 - cFYI(1, "sfu compat create special file"); 616 + cifs_dbg(FYI, "sfu compat create special file\n"); 620 617 621 618 buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); 622 619 if (buf == NULL) { ··· 691 688 692 689 xid = get_xid(); 693 690 694 - cFYI(1, "parent inode = 0x%p name is: %s and dentry = 0x%p", 695 - parent_dir_inode, direntry->d_name.name, direntry); 691 + cifs_dbg(FYI, "parent inode = 0x%p name is: %s and dentry = 0x%p\n", 692 + parent_dir_inode, direntry->d_name.name, direntry); 696 693 697 694 /* check whether path exists */ 698 695 ··· 718 715 } 719 716 720 717 if (direntry->d_inode != NULL) { 721 - cFYI(1, "non-NULL inode in lookup"); 718 + cifs_dbg(FYI, "non-NULL inode in lookup\n"); 722 719 } else { 723 - cFYI(1, "NULL inode in lookup"); 720 + cifs_dbg(FYI, "NULL inode in lookup\n"); 724 721 } 725 - cFYI(1, "Full path: %s inode = 0x%p", full_path, direntry->d_inode); 722 + cifs_dbg(FYI, "Full path: %s inode = 0x%p\n", 723 + full_path, direntry->d_inode); 726 724 727 725 if (pTcon->unix_ext) { 728 726 rc = cifs_get_inode_info_unix(&newInode, full_path, ··· 746 742 /* if it was once a directory (but how can we tell?) we could do 747 743 shrink_dcache_parent(direntry); */ 748 744 } else if (rc != -EACCES) { 749 - cERROR(1, "Unexpected lookup error %d", rc); 745 + cifs_dbg(VFS, "Unexpected lookup error %d\n", rc); 750 746 /* We special case check for Access Denied - since that 751 747 is a common return code */ 752 748 } ··· 811 807 { 812 808 int rc = 0; 813 809 814 - cFYI(1, "In cifs d_delete, name = %s", direntry->d_name.name); 810 + cifs_dbg(FYI, "In cifs d_delete, name = %s\n", direntry->d_name.name); 815 811 816 812 return rc; 817 813 } */
+9 -8
fs/cifs/dns_resolve.c
··· 55 55 56 56 len = strlen(unc); 57 57 if (len < 3) { 58 - cFYI(1, "%s: unc is too short: %s", __func__, unc); 58 + cifs_dbg(FYI, "%s: unc is too short: %s\n", __func__, unc); 59 59 return -EINVAL; 60 60 } 61 61 ··· 68 68 if (sep) 69 69 len = sep - hostname; 70 70 else 71 - cFYI(1, "%s: probably server name is whole unc: %s", 72 - __func__, unc); 71 + cifs_dbg(FYI, "%s: probably server name is whole unc: %s\n", 72 + __func__, unc); 73 73 74 74 /* Try to interpret hostname as an IPv4 or IPv6 address */ 75 75 rc = cifs_convert_address((struct sockaddr *)&ss, hostname, len); ··· 79 79 /* Perform the upcall */ 80 80 rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL); 81 81 if (rc < 0) 82 - cFYI(1, "%s: unable to resolve: %*.*s", 83 - __func__, len, len, hostname); 82 + cifs_dbg(FYI, "%s: unable to resolve: %*.*s\n", 83 + __func__, len, len, hostname); 84 84 else 85 - cFYI(1, "%s: resolved: %*.*s to %s", 86 - __func__, len, len, hostname, *ip_addr); 85 + cifs_dbg(FYI, "%s: resolved: %*.*s to %s\n", 86 + __func__, len, len, hostname, *ip_addr); 87 87 return rc; 88 88 89 89 name_is_IP_address: ··· 92 92 return -ENOMEM; 93 93 memcpy(name, hostname, len); 94 94 name[len] = 0; 95 - cFYI(1, "%s: unc is IP, skipping dns upcall: %s", __func__, name); 95 + cifs_dbg(FYI, "%s: unc is IP, skipping dns upcall: %s\n", 96 + __func__, name); 96 97 *ip_addr = name; 97 98 return 0; 98 99 }
+1 -1
fs/cifs/export.c
··· 49 49 static struct dentry *cifs_get_parent(struct dentry *dentry) 50 50 { 51 51 /* BB need to add code here eventually to enable export via NFSD */ 52 - cFYI(1, "get parent for %p", dentry); 52 + cifs_dbg(FYI, "get parent for %p\n", dentry); 53 53 return ERR_PTR(-EACCES); 54 54 } 55 55
+81 -85
fs/cifs/file.c
··· 78 78 if (flags & O_EXCL) 79 79 posix_flags |= SMB_O_EXCL; 80 80 } else if (flags & O_EXCL) 81 - cFYI(1, "Application %s pid %d has incorrectly set O_EXCL flag" 82 - "but not O_CREAT on file open. Ignoring O_EXCL", 83 - current->comm, current->tgid); 81 + cifs_dbg(FYI, "Application %s pid %d has incorrectly set O_EXCL flag but not O_CREAT on file open. Ignoring O_EXCL\n", 82 + current->comm, current->tgid); 84 83 85 84 if (flags & O_TRUNC) 86 85 posix_flags |= SMB_O_TRUNC; ··· 122 123 struct tcon_link *tlink; 123 124 struct cifs_tcon *tcon; 124 125 125 - cFYI(1, "posix open %s", full_path); 126 + cifs_dbg(FYI, "posix open %s\n", full_path); 126 127 127 128 presp_data = kzalloc(sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL); 128 129 if (presp_data == NULL) ··· 307 308 */ 308 309 if (oplock == server->vals->oplock_read && 309 310 cifs_has_mand_locks(cinode)) { 310 - cFYI(1, "Reset oplock val from read to None due to mand locks"); 311 + cifs_dbg(FYI, "Reset oplock val from read to None due to mand locks\n"); 311 312 oplock = 0; 312 313 } 313 314 ··· 373 374 list_del(&cifs_file->tlist); 374 375 375 376 if (list_empty(&cifsi->openFileList)) { 376 - cFYI(1, "closing last open instance for inode %p", 377 - cifs_file->dentry->d_inode); 377 + cifs_dbg(FYI, "closing last open instance for inode %p\n", 378 + cifs_file->dentry->d_inode); 378 379 /* 379 380 * In strict cache mode we need invalidate mapping on the last 380 381 * close because it may cause a error when we open this file ··· 453 454 goto out; 454 455 } 455 456 456 - cFYI(1, "inode = 0x%p file flags are 0x%x for %s", 457 + cifs_dbg(FYI, "inode = 0x%p file flags are 0x%x for %s\n", 457 458 inode, file->f_flags, full_path); 458 459 459 460 if (server->oplocks) ··· 469 470 cifs_sb->mnt_file_mode /* ignored */, 470 471 file->f_flags, &oplock, &fid.netfid, xid); 471 472 if (rc == 0) { 472 - cFYI(1, "posix open succeeded"); 473 + cifs_dbg(FYI, "posix open succeeded\n"); 473 474 posix_open_ok = true; 474 475 } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { 475 476 if (tcon->ses->serverNOS) 476 - cERROR(1, "server %s of type %s returned" 477 - " unexpected error on SMB posix open" 478 - ", disabling posix open support." 479 - " Check if server update available.", 480 - tcon->ses->serverName, 481 - tcon->ses->serverNOS); 477 + cifs_dbg(VFS, "server %s of type %s returned unexpected error on SMB posix open, disabling posix open support. Check if server update available.\n", 478 + tcon->ses->serverName, 479 + tcon->ses->serverNOS); 482 480 tcon->broken_posix_open = true; 483 481 } else if ((rc != -EIO) && (rc != -EREMOTE) && 484 482 (rc != -EOPNOTSUPP)) /* path not found or net err */ ··· 617 621 return rc; 618 622 } 619 623 620 - cFYI(1, "inode = 0x%p file flags 0x%x for %s", inode, cfile->f_flags, 621 - full_path); 624 + cifs_dbg(FYI, "inode = 0x%p file flags 0x%x for %s\n", 625 + inode, cfile->f_flags, full_path); 622 626 623 627 if (tcon->ses->server->oplocks) 624 628 oplock = REQ_OPLOCK; ··· 639 643 cifs_sb->mnt_file_mode /* ignored */, 640 644 oflags, &oplock, &fid.netfid, xid); 641 645 if (rc == 0) { 642 - cFYI(1, "posix reopen succeeded"); 646 + cifs_dbg(FYI, "posix reopen succeeded\n"); 643 647 goto reopen_success; 644 648 } 645 649 /* ··· 668 672 NULL, cifs_sb); 669 673 if (rc) { 670 674 mutex_unlock(&cfile->fh_mutex); 671 - cFYI(1, "cifs_reopen returned 0x%x", rc); 672 - cFYI(1, "oplock: %d", oplock); 675 + cifs_dbg(FYI, "cifs_reopen returned 0x%x\n", rc); 676 + cifs_dbg(FYI, "oplock: %d\n", oplock); 673 677 goto reopen_error_exit; 674 678 } 675 679 ··· 725 729 struct TCP_Server_Info *server; 726 730 char *buf; 727 731 728 - cFYI(1, "Closedir inode = 0x%p", inode); 732 + cifs_dbg(FYI, "Closedir inode = 0x%p\n", inode); 729 733 730 734 if (cfile == NULL) 731 735 return rc; ··· 734 738 tcon = tlink_tcon(cfile->tlink); 735 739 server = tcon->ses->server; 736 740 737 - cFYI(1, "Freeing private data in close dir"); 741 + cifs_dbg(FYI, "Freeing private data in close dir\n"); 738 742 spin_lock(&cifs_file_list_lock); 739 743 if (!cfile->srch_inf.endOfSearch && !cfile->invalidHandle) { 740 744 cfile->invalidHandle = true; ··· 743 747 rc = server->ops->close_dir(xid, tcon, &cfile->fid); 744 748 else 745 749 rc = -ENOSYS; 746 - cFYI(1, "Closing uncompleted readdir with rc %d", rc); 750 + cifs_dbg(FYI, "Closing uncompleted readdir with rc %d\n", rc); 747 751 /* not much we can do if it fails anyway, ignore rc */ 748 752 rc = 0; 749 753 } else ··· 751 755 752 756 buf = cfile->srch_inf.ntwrk_buf_start; 753 757 if (buf) { 754 - cFYI(1, "closedir free smb buf in srch struct"); 758 + cifs_dbg(FYI, "closedir free smb buf in srch struct\n"); 755 759 cfile->srch_inf.ntwrk_buf_start = NULL; 756 760 if (cfile->srch_inf.smallBuf) 757 761 cifs_small_buf_release(buf); ··· 1136 1140 * The list ended. We don't have enough allocated 1137 1141 * structures - something is really wrong. 1138 1142 */ 1139 - cERROR(1, "Can't push all brlocks!"); 1143 + cifs_dbg(VFS, "Can't push all brlocks!\n"); 1140 1144 break; 1141 1145 } 1142 1146 length = 1 + flock->fl_end - flock->fl_start; ··· 1209 1213 bool *wait_flag, struct TCP_Server_Info *server) 1210 1214 { 1211 1215 if (flock->fl_flags & FL_POSIX) 1212 - cFYI(1, "Posix"); 1216 + cifs_dbg(FYI, "Posix\n"); 1213 1217 if (flock->fl_flags & FL_FLOCK) 1214 - cFYI(1, "Flock"); 1218 + cifs_dbg(FYI, "Flock\n"); 1215 1219 if (flock->fl_flags & FL_SLEEP) { 1216 - cFYI(1, "Blocking lock"); 1220 + cifs_dbg(FYI, "Blocking lock\n"); 1217 1221 *wait_flag = true; 1218 1222 } 1219 1223 if (flock->fl_flags & FL_ACCESS) 1220 - cFYI(1, "Process suspended by mandatory locking - " 1221 - "not implemented yet"); 1224 + cifs_dbg(FYI, "Process suspended by mandatory locking - not implemented yet\n"); 1222 1225 if (flock->fl_flags & FL_LEASE) 1223 - cFYI(1, "Lease on file - not implemented yet"); 1226 + cifs_dbg(FYI, "Lease on file - not implemented yet\n"); 1224 1227 if (flock->fl_flags & 1225 1228 (~(FL_POSIX | FL_FLOCK | FL_SLEEP | 1226 1229 FL_ACCESS | FL_LEASE | FL_CLOSE))) 1227 - cFYI(1, "Unknown lock flags 0x%x", flock->fl_flags); 1230 + cifs_dbg(FYI, "Unknown lock flags 0x%x\n", flock->fl_flags); 1228 1231 1229 1232 *type = server->vals->large_lock_type; 1230 1233 if (flock->fl_type == F_WRLCK) { 1231 - cFYI(1, "F_WRLCK "); 1234 + cifs_dbg(FYI, "F_WRLCK\n"); 1232 1235 *type |= server->vals->exclusive_lock_type; 1233 1236 *lock = 1; 1234 1237 } else if (flock->fl_type == F_UNLCK) { 1235 - cFYI(1, "F_UNLCK"); 1238 + cifs_dbg(FYI, "F_UNLCK\n"); 1236 1239 *type |= server->vals->unlock_lock_type; 1237 1240 *unlock = 1; 1238 1241 /* Check if unlock includes more than one lock range */ 1239 1242 } else if (flock->fl_type == F_RDLCK) { 1240 - cFYI(1, "F_RDLCK"); 1243 + cifs_dbg(FYI, "F_RDLCK\n"); 1241 1244 *type |= server->vals->shared_lock_type; 1242 1245 *lock = 1; 1243 1246 } else if (flock->fl_type == F_EXLCK) { 1244 - cFYI(1, "F_EXLCK"); 1247 + cifs_dbg(FYI, "F_EXLCK\n"); 1245 1248 *type |= server->vals->exclusive_lock_type; 1246 1249 *lock = 1; 1247 1250 } else if (flock->fl_type == F_SHLCK) { 1248 - cFYI(1, "F_SHLCK"); 1251 + cifs_dbg(FYI, "F_SHLCK\n"); 1249 1252 *type |= server->vals->shared_lock_type; 1250 1253 *lock = 1; 1251 1254 } else 1252 - cFYI(1, "Unknown type of lock"); 1255 + cifs_dbg(FYI, "Unknown type of lock\n"); 1253 1256 } 1254 1257 1255 1258 static int ··· 1291 1296 type, 0, 1, false); 1292 1297 flock->fl_type = F_UNLCK; 1293 1298 if (rc != 0) 1294 - cERROR(1, "Error unlocking previously locked " 1295 - "range %d during test of lock", rc); 1299 + cifs_dbg(VFS, "Error unlocking previously locked range %d during test of lock\n", 1300 + rc); 1296 1301 return 0; 1297 1302 } 1298 1303 ··· 1311 1316 type | server->vals->shared_lock_type, 0, 1, false); 1312 1317 flock->fl_type = F_RDLCK; 1313 1318 if (rc != 0) 1314 - cERROR(1, "Error unlocking previously locked " 1315 - "range %d during test of lock", rc); 1319 + cifs_dbg(VFS, "Error unlocking previously locked range %d during test of lock\n", 1320 + rc); 1316 1321 } else 1317 1322 flock->fl_type = F_WRLCK; 1318 1323 ··· 1503 1508 if (!CIFS_I(inode)->clientCanCacheAll && 1504 1509 CIFS_I(inode)->clientCanCacheRead) { 1505 1510 cifs_invalidate_mapping(inode); 1506 - cFYI(1, "Set no oplock for inode=%p due to mand locks", 1507 - inode); 1511 + cifs_dbg(FYI, "Set no oplock for inode=%p due to mand locks\n", 1512 + inode); 1508 1513 CIFS_I(inode)->clientCanCacheRead = false; 1509 1514 } 1510 1515 ··· 1541 1546 rc = -EACCES; 1542 1547 xid = get_xid(); 1543 1548 1544 - cFYI(1, "Lock parm: 0x%x flockflags: 0x%x flocktype: 0x%x start: %lld " 1545 - "end: %lld", cmd, flock->fl_flags, flock->fl_type, 1546 - flock->fl_start, flock->fl_end); 1549 + cifs_dbg(FYI, "Lock parm: 0x%x flockflags: 0x%x flocktype: 0x%x start: %lld end: %lld\n", 1550 + cmd, flock->fl_flags, flock->fl_type, 1551 + flock->fl_start, flock->fl_end); 1547 1552 1548 1553 cfile = (struct cifsFileInfo *)file->private_data; 1549 1554 tcon = tlink_tcon(cfile->tlink); ··· 1615 1620 1616 1621 cifs_sb = CIFS_SB(dentry->d_sb); 1617 1622 1618 - cFYI(1, "write %zd bytes to offset %lld of %s", write_size, 1619 - *offset, dentry->d_name.name); 1623 + cifs_dbg(FYI, "write %zd bytes to offset %lld of %s\n", 1624 + write_size, *offset, dentry->d_name.name); 1620 1625 1621 1626 tcon = tlink_tcon(open_file->tlink); 1622 1627 server = tcon->ses->server; ··· 1731 1736 it being zero) during stress testcases so we need to check for it */ 1732 1737 1733 1738 if (cifs_inode == NULL) { 1734 - cERROR(1, "Null inode passed to cifs_writeable_file"); 1739 + cifs_dbg(VFS, "Null inode passed to cifs_writeable_file\n"); 1735 1740 dump_stack(); 1736 1741 return NULL; 1737 1742 } ··· 1843 1848 else if (bytes_written < 0) 1844 1849 rc = bytes_written; 1845 1850 } else { 1846 - cFYI(1, "No writeable filehandles for inode"); 1851 + cifs_dbg(FYI, "No writeable filehandles for inode\n"); 1847 1852 rc = -EIO; 1848 1853 } 1849 1854 ··· 2010 2015 wdata->cfile = find_writable_file(CIFS_I(mapping->host), 2011 2016 false); 2012 2017 if (!wdata->cfile) { 2013 - cERROR(1, "No writable handles for inode"); 2018 + cifs_dbg(VFS, "No writable handles for inode\n"); 2014 2019 rc = -EBADF; 2015 2020 break; 2016 2021 } ··· 2071 2076 /* BB add check for wbc flags */ 2072 2077 page_cache_get(page); 2073 2078 if (!PageUptodate(page)) 2074 - cFYI(1, "ppw - page not up to date"); 2079 + cifs_dbg(FYI, "ppw - page not up to date\n"); 2075 2080 2076 2081 /* 2077 2082 * Set the "writeback" flag, and clear "dirty" in the radix tree. ··· 2122 2127 else 2123 2128 pid = current->tgid; 2124 2129 2125 - cFYI(1, "write_end for page %p from pos %lld with %d bytes", 2130 + cifs_dbg(FYI, "write_end for page %p from pos %lld with %d bytes\n", 2126 2131 page, pos, copied); 2127 2132 2128 2133 if (PageChecked(page)) { ··· 2186 2191 2187 2192 xid = get_xid(); 2188 2193 2189 - cFYI(1, "Sync file - name: %s datasync: 0x%x", 2190 - file->f_path.dentry->d_name.name, datasync); 2194 + cifs_dbg(FYI, "Sync file - name: %s datasync: 0x%x\n", 2195 + file->f_path.dentry->d_name.name, datasync); 2191 2196 2192 2197 if (!CIFS_I(inode)->clientCanCacheRead) { 2193 2198 rc = cifs_invalidate_mapping(inode); 2194 2199 if (rc) { 2195 - cFYI(1, "rc: %d during invalidate phase", rc); 2200 + cifs_dbg(FYI, "rc: %d during invalidate phase\n", rc); 2196 2201 rc = 0; /* don't care about it in fsync */ 2197 2202 } 2198 2203 } ··· 2228 2233 2229 2234 xid = get_xid(); 2230 2235 2231 - cFYI(1, "Sync file - name: %s datasync: 0x%x", 2232 - file->f_path.dentry->d_name.name, datasync); 2236 + cifs_dbg(FYI, "Sync file - name: %s datasync: 0x%x\n", 2237 + file->f_path.dentry->d_name.name, datasync); 2233 2238 2234 2239 tcon = tlink_tcon(smbfile->tlink); 2235 2240 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOSSYNC)) { ··· 2257 2262 if (file->f_mode & FMODE_WRITE) 2258 2263 rc = filemap_write_and_wait(inode->i_mapping); 2259 2264 2260 - cFYI(1, "Flush inode %p file %p rc %d", inode, file, rc); 2265 + cifs_dbg(FYI, "Flush inode %p file %p rc %d\n", inode, file, rc); 2261 2266 2262 2267 return rc; 2263 2268 } ··· 2574 2579 * an old data. 2575 2580 */ 2576 2581 cifs_invalidate_mapping(inode); 2577 - cFYI(1, "Set no oplock for inode=%p after a write operation", 2578 - inode); 2582 + cifs_dbg(FYI, "Set no oplock for inode=%p after a write operation\n", 2583 + inode); 2579 2584 cinode->clientCanCacheRead = false; 2580 2585 } 2581 2586 return written; ··· 2751 2756 /* enough data to fill the page */ 2752 2757 iov.iov_base = kmap(page); 2753 2758 iov.iov_len = PAGE_SIZE; 2754 - cFYI(1, "%u: iov_base=%p iov_len=%zu", 2755 - i, iov.iov_base, iov.iov_len); 2759 + cifs_dbg(FYI, "%u: iov_base=%p iov_len=%zu\n", 2760 + i, iov.iov_base, iov.iov_len); 2756 2761 len -= PAGE_SIZE; 2757 2762 } else if (len > 0) { 2758 2763 /* enough for partial page, fill and zero the rest */ 2759 2764 iov.iov_base = kmap(page); 2760 2765 iov.iov_len = len; 2761 - cFYI(1, "%u: iov_base=%p iov_len=%zu", 2762 - i, iov.iov_base, iov.iov_len); 2766 + cifs_dbg(FYI, "%u: iov_base=%p iov_len=%zu\n", 2767 + i, iov.iov_base, iov.iov_len); 2763 2768 memset(iov.iov_base + len, '\0', PAGE_SIZE - len); 2764 2769 rdata->tailsz = len; 2765 2770 len = 0; ··· 2819 2824 pid = current->tgid; 2820 2825 2821 2826 if ((file->f_flags & O_ACCMODE) == O_WRONLY) 2822 - cFYI(1, "attempting read on write only file instance"); 2827 + cifs_dbg(FYI, "attempting read on write only file instance\n"); 2823 2828 2824 2829 do { 2825 2830 cur_len = min_t(const size_t, len - total_read, cifs_sb->rsize); ··· 2998 3003 pid = current->tgid; 2999 3004 3000 3005 if ((file->f_flags & O_ACCMODE) == O_WRONLY) 3001 - cFYI(1, "attempting read on write only file instance"); 3006 + cifs_dbg(FYI, "attempting read on write only file instance\n"); 3002 3007 3003 3008 for (total_read = 0, cur_offset = read_data; read_size > total_read; 3004 3009 total_read += bytes_read, cur_offset += bytes_read) { ··· 3089 3094 xid = get_xid(); 3090 3095 rc = cifs_revalidate_file(file); 3091 3096 if (rc) { 3092 - cFYI(1, "Validation prior to mmap failed, error=%d", rc); 3097 + cifs_dbg(FYI, "Validation prior to mmap failed, error=%d\n", 3098 + rc); 3093 3099 free_xid(xid); 3094 3100 return rc; 3095 3101 } ··· 3143 3147 /* determine the eof that the server (probably) has */ 3144 3148 eof = CIFS_I(rdata->mapping->host)->server_eof; 3145 3149 eof_index = eof ? (eof - 1) >> PAGE_CACHE_SHIFT : 0; 3146 - cFYI(1, "eof=%llu eof_index=%lu", eof, eof_index); 3150 + cifs_dbg(FYI, "eof=%llu eof_index=%lu\n", eof, eof_index); 3147 3151 3148 3152 rdata->tailsz = PAGE_CACHE_SIZE; 3149 3153 for (i = 0; i < nr_pages; i++) { ··· 3153 3157 /* enough data to fill the page */ 3154 3158 iov.iov_base = kmap(page); 3155 3159 iov.iov_len = PAGE_CACHE_SIZE; 3156 - cFYI(1, "%u: idx=%lu iov_base=%p iov_len=%zu", 3157 - i, page->index, iov.iov_base, iov.iov_len); 3160 + cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n", 3161 + i, page->index, iov.iov_base, iov.iov_len); 3158 3162 len -= PAGE_CACHE_SIZE; 3159 3163 } else if (len > 0) { 3160 3164 /* enough for partial page, fill and zero the rest */ 3161 3165 iov.iov_base = kmap(page); 3162 3166 iov.iov_len = len; 3163 - cFYI(1, "%u: idx=%lu iov_base=%p iov_len=%zu", 3164 - i, page->index, iov.iov_base, iov.iov_len); 3167 + cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n", 3168 + i, page->index, iov.iov_base, iov.iov_len); 3165 3169 memset(iov.iov_base + len, 3166 3170 '\0', PAGE_CACHE_SIZE - len); 3167 3171 rdata->tailsz = len; ··· 3241 3245 rc = 0; 3242 3246 INIT_LIST_HEAD(&tmplist); 3243 3247 3244 - cFYI(1, "%s: file=%p mapping=%p num_pages=%u", __func__, file, 3245 - mapping, num_pages); 3248 + cifs_dbg(FYI, "%s: file=%p mapping=%p num_pages=%u\n", 3249 + __func__, file, mapping, num_pages); 3246 3250 3247 3251 /* 3248 3252 * Start with the page at end of list and move it to private ··· 3372 3376 if (rc < 0) 3373 3377 goto io_error; 3374 3378 else 3375 - cFYI(1, "Bytes read %d", rc); 3379 + cifs_dbg(FYI, "Bytes read %d\n", rc); 3376 3380 3377 3381 file_inode(file)->i_atime = 3378 3382 current_fs_time(file_inode(file)->i_sb); ··· 3410 3414 return rc; 3411 3415 } 3412 3416 3413 - cFYI(1, "readpage %p at offset %d 0x%x", 3417 + cifs_dbg(FYI, "readpage %p at offset %d 0x%x\n", 3414 3418 page, (int)offset, (int)offset); 3415 3419 3416 3420 rc = cifs_readpage_worker(file, page, &offset); ··· 3477 3481 struct page *page; 3478 3482 int rc = 0; 3479 3483 3480 - cFYI(1, "write_begin from %lld len %d", (long long)pos, len); 3484 + cifs_dbg(FYI, "write_begin from %lld len %d\n", (long long)pos, len); 3481 3485 3482 3486 page = grab_cache_page_write_begin(mapping, index, flags); 3483 3487 if (!page) { ··· 3566 3570 .range_end = range_end, 3567 3571 }; 3568 3572 3569 - cFYI(1, "Launder page: %p", page); 3573 + cifs_dbg(FYI, "Launder page: %p\n", page); 3570 3574 3571 3575 if (clear_page_dirty_for_io(page)) 3572 3576 rc = cifs_writepage_locked(page, &wbc); ··· 3586 3590 3587 3591 if (!cinode->clientCanCacheAll && cinode->clientCanCacheRead && 3588 3592 cifs_has_mand_locks(cinode)) { 3589 - cFYI(1, "Reset oplock to None for inode=%p due to mand locks", 3590 - inode); 3593 + cifs_dbg(FYI, "Reset oplock to None for inode=%p due to mand locks\n", 3594 + inode); 3591 3595 cinode->clientCanCacheRead = false; 3592 3596 } 3593 3597 ··· 3602 3606 mapping_set_error(inode->i_mapping, rc); 3603 3607 cifs_invalidate_mapping(inode); 3604 3608 } 3605 - cFYI(1, "Oplock flush inode %p rc %d", inode, rc); 3609 + cifs_dbg(FYI, "Oplock flush inode %p rc %d\n", inode, rc); 3606 3610 } 3607 3611 3608 3612 rc = cifs_push_locks(cfile); 3609 3613 if (rc) 3610 - cERROR(1, "Push locks rc = %d", rc); 3614 + cifs_dbg(VFS, "Push locks rc = %d\n", rc); 3611 3615 3612 3616 /* 3613 3617 * releasing stale oplock after recent reconnect of smb session using ··· 3618 3622 if (!cfile->oplock_break_cancelled) { 3619 3623 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid, 3620 3624 cinode); 3621 - cFYI(1, "Oplock release rc = %d", rc); 3625 + cifs_dbg(FYI, "Oplock release rc = %d\n", rc); 3622 3626 } 3623 3627 } 3624 3628
+29 -29
fs/cifs/fscache.c
··· 28 28 server->fscache = 29 29 fscache_acquire_cookie(cifs_fscache_netfs.primary_index, 30 30 &cifs_fscache_server_index_def, server); 31 - cFYI(1, "%s: (0x%p/0x%p)", __func__, server, 32 - server->fscache); 31 + cifs_dbg(FYI, "%s: (0x%p/0x%p)\n", 32 + __func__, server, server->fscache); 33 33 } 34 34 35 35 void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server) 36 36 { 37 - cFYI(1, "%s: (0x%p/0x%p)", __func__, server, 38 - server->fscache); 37 + cifs_dbg(FYI, "%s: (0x%p/0x%p)\n", 38 + __func__, server, server->fscache); 39 39 fscache_relinquish_cookie(server->fscache, 0); 40 40 server->fscache = NULL; 41 41 } ··· 47 47 tcon->fscache = 48 48 fscache_acquire_cookie(server->fscache, 49 49 &cifs_fscache_super_index_def, tcon); 50 - cFYI(1, "%s: (0x%p/0x%p)", __func__, server->fscache, 51 - tcon->fscache); 50 + cifs_dbg(FYI, "%s: (0x%p/0x%p)\n", 51 + __func__, server->fscache, tcon->fscache); 52 52 } 53 53 54 54 void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon) 55 55 { 56 - cFYI(1, "%s: (0x%p)", __func__, tcon->fscache); 56 + cifs_dbg(FYI, "%s: (0x%p)\n", __func__, tcon->fscache); 57 57 fscache_relinquish_cookie(tcon->fscache, 0); 58 58 tcon->fscache = NULL; 59 59 } ··· 70 70 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE) { 71 71 cifsi->fscache = fscache_acquire_cookie(tcon->fscache, 72 72 &cifs_fscache_inode_object_def, cifsi); 73 - cFYI(1, "%s: got FH cookie (0x%p/0x%p)", __func__, 74 - tcon->fscache, cifsi->fscache); 73 + cifs_dbg(FYI, "%s: got FH cookie (0x%p/0x%p)\n", 74 + __func__, tcon->fscache, cifsi->fscache); 75 75 } 76 76 } 77 77 ··· 80 80 struct cifsInodeInfo *cifsi = CIFS_I(inode); 81 81 82 82 if (cifsi->fscache) { 83 - cFYI(1, "%s: (0x%p)", __func__, cifsi->fscache); 83 + cifs_dbg(FYI, "%s: (0x%p)\n", __func__, cifsi->fscache); 84 84 fscache_relinquish_cookie(cifsi->fscache, 0); 85 85 cifsi->fscache = NULL; 86 86 } ··· 91 91 struct cifsInodeInfo *cifsi = CIFS_I(inode); 92 92 93 93 if (cifsi->fscache) { 94 - cFYI(1, "%s: (0x%p)", __func__, cifsi->fscache); 94 + cifs_dbg(FYI, "%s: (0x%p)\n", __func__, cifsi->fscache); 95 95 fscache_uncache_all_inode_pages(cifsi->fscache, inode); 96 96 fscache_relinquish_cookie(cifsi->fscache, 1); 97 97 cifsi->fscache = NULL; ··· 120 120 cifs_sb_master_tcon(cifs_sb)->fscache, 121 121 &cifs_fscache_inode_object_def, 122 122 cifsi); 123 - cFYI(1, "%s: new cookie 0x%p oldcookie 0x%p", 124 - __func__, cifsi->fscache, old); 123 + cifs_dbg(FYI, "%s: new cookie 0x%p oldcookie 0x%p\n", 124 + __func__, cifsi->fscache, old); 125 125 } 126 126 } 127 127 ··· 131 131 struct inode *inode = page->mapping->host; 132 132 struct cifsInodeInfo *cifsi = CIFS_I(inode); 133 133 134 - cFYI(1, "%s: (0x%p/0x%p)", __func__, page, 135 - cifsi->fscache); 134 + cifs_dbg(FYI, "%s: (0x%p/0x%p)\n", 135 + __func__, page, cifsi->fscache); 136 136 if (!fscache_maybe_release_page(cifsi->fscache, page, gfp)) 137 137 return 0; 138 138 } ··· 143 143 static void cifs_readpage_from_fscache_complete(struct page *page, void *ctx, 144 144 int error) 145 145 { 146 - cFYI(1, "%s: (0x%p/%d)", __func__, page, error); 146 + cifs_dbg(FYI, "%s: (0x%p/%d)\n", __func__, page, error); 147 147 if (!error) 148 148 SetPageUptodate(page); 149 149 unlock_page(page); ··· 156 156 { 157 157 int ret; 158 158 159 - cFYI(1, "%s: (fsc:%p, p:%p, i:0x%p", __func__, 160 - CIFS_I(inode)->fscache, page, inode); 159 + cifs_dbg(FYI, "%s: (fsc:%p, p:%p, i:0x%p\n", 160 + __func__, CIFS_I(inode)->fscache, page, inode); 161 161 ret = fscache_read_or_alloc_page(CIFS_I(inode)->fscache, page, 162 162 cifs_readpage_from_fscache_complete, 163 163 NULL, ··· 165 165 switch (ret) { 166 166 167 167 case 0: /* page found in fscache, read submitted */ 168 - cFYI(1, "%s: submitted", __func__); 168 + cifs_dbg(FYI, "%s: submitted\n", __func__); 169 169 return ret; 170 170 case -ENOBUFS: /* page won't be cached */ 171 171 case -ENODATA: /* page not in cache */ 172 - cFYI(1, "%s: %d", __func__, ret); 172 + cifs_dbg(FYI, "%s: %d\n", __func__, ret); 173 173 return 1; 174 174 175 175 default: 176 - cERROR(1, "unknown error ret = %d", ret); 176 + cifs_dbg(VFS, "unknown error ret = %d\n", ret); 177 177 } 178 178 return ret; 179 179 } ··· 188 188 { 189 189 int ret; 190 190 191 - cFYI(1, "%s: (0x%p/%u/0x%p)", __func__, 192 - CIFS_I(inode)->fscache, *nr_pages, inode); 191 + cifs_dbg(FYI, "%s: (0x%p/%u/0x%p)\n", 192 + __func__, CIFS_I(inode)->fscache, *nr_pages, inode); 193 193 ret = fscache_read_or_alloc_pages(CIFS_I(inode)->fscache, mapping, 194 194 pages, nr_pages, 195 195 cifs_readpage_from_fscache_complete, ··· 197 197 mapping_gfp_mask(mapping)); 198 198 switch (ret) { 199 199 case 0: /* read submitted to the cache for all pages */ 200 - cFYI(1, "%s: submitted", __func__); 200 + cifs_dbg(FYI, "%s: submitted\n", __func__); 201 201 return ret; 202 202 203 203 case -ENOBUFS: /* some pages are not cached and can't be */ 204 204 case -ENODATA: /* some pages are not cached */ 205 - cFYI(1, "%s: no page", __func__); 205 + cifs_dbg(FYI, "%s: no page\n", __func__); 206 206 return 1; 207 207 208 208 default: 209 - cFYI(1, "unknown error ret = %d", ret); 209 + cifs_dbg(FYI, "unknown error ret = %d\n", ret); 210 210 } 211 211 212 212 return ret; ··· 216 216 { 217 217 int ret; 218 218 219 - cFYI(1, "%s: (fsc: %p, p: %p, i: %p)", __func__, 220 - CIFS_I(inode)->fscache, page, inode); 219 + cifs_dbg(FYI, "%s: (fsc: %p, p: %p, i: %p)\n", 220 + __func__, CIFS_I(inode)->fscache, page, inode); 221 221 ret = fscache_write_page(CIFS_I(inode)->fscache, page, GFP_KERNEL); 222 222 if (ret != 0) 223 223 fscache_uncache_page(CIFS_I(inode)->fscache, page); ··· 228 228 struct cifsInodeInfo *cifsi = CIFS_I(inode); 229 229 struct fscache_cookie *cookie = cifsi->fscache; 230 230 231 - cFYI(1, "%s: (0x%p/0x%p)", __func__, page, cookie); 231 + cifs_dbg(FYI, "%s: (0x%p/0x%p)\n", __func__, page, cookie); 232 232 fscache_wait_on_page_write(cookie, page); 233 233 fscache_uncache_page(cookie, page); 234 234 }
+57 -52
fs/cifs/inode.c
··· 91 91 { 92 92 struct cifsInodeInfo *cifs_i = CIFS_I(inode); 93 93 94 - cFYI(1, "%s: revalidating inode %llu", __func__, cifs_i->uniqueid); 94 + cifs_dbg(FYI, "%s: revalidating inode %llu\n", 95 + __func__, cifs_i->uniqueid); 95 96 96 97 if (inode->i_state & I_NEW) { 97 - cFYI(1, "%s: inode %llu is new", __func__, cifs_i->uniqueid); 98 + cifs_dbg(FYI, "%s: inode %llu is new\n", 99 + __func__, cifs_i->uniqueid); 98 100 return; 99 101 } 100 102 101 103 /* don't bother with revalidation if we have an oplock */ 102 104 if (cifs_i->clientCanCacheRead) { 103 - cFYI(1, "%s: inode %llu is oplocked", __func__, 104 - cifs_i->uniqueid); 105 + cifs_dbg(FYI, "%s: inode %llu is oplocked\n", 106 + __func__, cifs_i->uniqueid); 105 107 return; 106 108 } 107 109 108 110 /* revalidate if mtime or size have changed */ 109 111 if (timespec_equal(&inode->i_mtime, &fattr->cf_mtime) && 110 112 cifs_i->server_eof == fattr->cf_eof) { 111 - cFYI(1, "%s: inode %llu is unchanged", __func__, 112 - cifs_i->uniqueid); 113 + cifs_dbg(FYI, "%s: inode %llu is unchanged\n", 114 + __func__, cifs_i->uniqueid); 113 115 return; 114 116 } 115 117 116 - cFYI(1, "%s: invalidating inode %llu mapping", __func__, 117 - cifs_i->uniqueid); 118 + cifs_dbg(FYI, "%s: invalidating inode %llu mapping\n", 119 + __func__, cifs_i->uniqueid); 118 120 cifs_i->invalid_mapping = true; 119 121 } 120 122 ··· 242 240 /* safest to call it a file if we do not know */ 243 241 fattr->cf_mode |= S_IFREG; 244 242 fattr->cf_dtype = DT_REG; 245 - cFYI(1, "unknown type %d", le32_to_cpu(info->Type)); 243 + cifs_dbg(FYI, "unknown type %d\n", le32_to_cpu(info->Type)); 246 244 break; 247 245 } 248 246 ··· 281 279 { 282 280 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 283 281 284 - cFYI(1, "creating fake fattr for DFS referral"); 282 + cifs_dbg(FYI, "creating fake fattr for DFS referral\n"); 285 283 286 284 memset(fattr, 0, sizeof(*fattr)); 287 285 fattr->cf_mode = S_IFDIR | S_IXUGO | S_IRWXU; ··· 331 329 struct tcon_link *tlink; 332 330 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 333 331 334 - cFYI(1, "Getting info on %s", full_path); 332 + cifs_dbg(FYI, "Getting info on %s\n", full_path); 335 333 336 334 tlink = cifs_sb_tlink(cifs_sb); 337 335 if (IS_ERR(tlink)) ··· 357 355 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) { 358 356 int tmprc = CIFSCheckMFSymlink(&fattr, full_path, cifs_sb, xid); 359 357 if (tmprc) 360 - cFYI(1, "CIFSCheckMFSymlink: %d", tmprc); 358 + cifs_dbg(FYI, "CIFSCheckMFSymlink: %d\n", tmprc); 361 359 } 362 360 363 361 if (*pinode == NULL) { ··· 424 422 &buf_type); 425 423 if ((rc == 0) && (bytes_read >= 8)) { 426 424 if (memcmp("IntxBLK", pbuf, 8) == 0) { 427 - cFYI(1, "Block device"); 425 + cifs_dbg(FYI, "Block device\n"); 428 426 fattr->cf_mode |= S_IFBLK; 429 427 fattr->cf_dtype = DT_BLK; 430 428 if (bytes_read == 24) { ··· 436 434 fattr->cf_rdev = MKDEV(mjr, mnr); 437 435 } 438 436 } else if (memcmp("IntxCHR", pbuf, 8) == 0) { 439 - cFYI(1, "Char device"); 437 + cifs_dbg(FYI, "Char device\n"); 440 438 fattr->cf_mode |= S_IFCHR; 441 439 fattr->cf_dtype = DT_CHR; 442 440 if (bytes_read == 24) { ··· 448 446 fattr->cf_rdev = MKDEV(mjr, mnr); 449 447 } 450 448 } else if (memcmp("IntxLNK", pbuf, 7) == 0) { 451 - cFYI(1, "Symlink"); 449 + cifs_dbg(FYI, "Symlink\n"); 452 450 fattr->cf_mode |= S_IFLNK; 453 451 fattr->cf_dtype = DT_LNK; 454 452 } else { ··· 499 497 else if (rc > 3) { 500 498 mode = le32_to_cpu(*((__le32 *)ea_value)); 501 499 fattr->cf_mode &= ~SFBITS_MASK; 502 - cFYI(1, "special bits 0%o org mode 0%o", mode, 503 - fattr->cf_mode); 500 + cifs_dbg(FYI, "special bits 0%o org mode 0%o\n", 501 + mode, fattr->cf_mode); 504 502 fattr->cf_mode = (mode & SFBITS_MASK) | fattr->cf_mode; 505 - cFYI(1, "special mode bits 0%o", mode); 503 + cifs_dbg(FYI, "special mode bits 0%o\n", mode); 506 504 } 507 505 508 506 return 0; ··· 637 635 tcon = tlink_tcon(tlink); 638 636 server = tcon->ses->server; 639 637 640 - cFYI(1, "Getting info on %s", full_path); 638 + cifs_dbg(FYI, "Getting info on %s\n", full_path); 641 639 642 640 if ((data == NULL) && (*inode != NULL)) { 643 641 if (CIFS_I(*inode)->clientCanCacheRead) { 644 - cFYI(1, "No need to revalidate cached inode sizes"); 642 + cifs_dbg(FYI, "No need to revalidate cached inode sizes\n"); 645 643 goto cgii_exit; 646 644 } 647 645 } ··· 716 714 tcon, cifs_sb, full_path, 717 715 &fattr.cf_uniqueid, data); 718 716 if (tmprc) { 719 - cFYI(1, "GetSrvInodeNum rc %d", tmprc); 717 + cifs_dbg(FYI, "GetSrvInodeNum rc %d\n", 718 + tmprc); 720 719 fattr.cf_uniqueid = iunique(sb, ROOT_I); 721 720 cifs_autodisable_serverino(cifs_sb); 722 721 } ··· 732 729 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) { 733 730 tmprc = cifs_sfu_type(&fattr, full_path, cifs_sb, xid); 734 731 if (tmprc) 735 - cFYI(1, "cifs_sfu_type failed: %d", tmprc); 732 + cifs_dbg(FYI, "cifs_sfu_type failed: %d\n", tmprc); 736 733 } 737 734 738 735 #ifdef CONFIG_CIFS_ACL ··· 740 737 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { 741 738 rc = cifs_acl_to_fattr(cifs_sb, &fattr, *inode, full_path, fid); 742 739 if (rc) { 743 - cFYI(1, "%s: Getting ACL failed with error: %d", 744 - __func__, rc); 740 + cifs_dbg(FYI, "%s: Getting ACL failed with error: %d\n", 741 + __func__, rc); 745 742 goto cgii_exit; 746 743 } 747 744 } ··· 755 752 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) { 756 753 tmprc = CIFSCheckMFSymlink(&fattr, full_path, cifs_sb, xid); 757 754 if (tmprc) 758 - cFYI(1, "CIFSCheckMFSymlink: %d", tmprc); 755 + cifs_dbg(FYI, "CIFSCheckMFSymlink: %d\n", tmprc); 759 756 } 760 757 761 758 if (!*inode) { ··· 839 836 struct inode *inode; 840 837 841 838 retry_iget5_locked: 842 - cFYI(1, "looking for uniqueid=%llu", fattr->cf_uniqueid); 839 + cifs_dbg(FYI, "looking for uniqueid=%llu\n", fattr->cf_uniqueid); 843 840 844 841 /* hash down to 32-bits on 32-bit arch */ 845 842 hash = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid); ··· 902 899 #endif 903 900 904 901 if (rc && tcon->ipc) { 905 - cFYI(1, "ipc connection - fake read inode"); 902 + cifs_dbg(FYI, "ipc connection - fake read inode\n"); 906 903 spin_lock(&inode->i_lock); 907 904 inode->i_mode |= S_IFDIR; 908 905 set_nlink(inode, 2); ··· 961 958 * server times. 962 959 */ 963 960 if (set_time && (attrs->ia_valid & ATTR_CTIME)) { 964 - cFYI(1, "CIFS - CTIME changed"); 961 + cifs_dbg(FYI, "CIFS - CTIME changed\n"); 965 962 info_buf.ChangeTime = 966 963 cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_ctime)); 967 964 } else ··· 1130 1127 struct iattr *attrs = NULL; 1131 1128 __u32 dosattr = 0, origattr = 0; 1132 1129 1133 - cFYI(1, "cifs_unlink, dir=0x%p, dentry=0x%p", dir, dentry); 1130 + cifs_dbg(FYI, "cifs_unlink, dir=0x%p, dentry=0x%p\n", dir, dentry); 1134 1131 1135 1132 tlink = cifs_sb_tlink(cifs_sb); 1136 1133 if (IS_ERR(tlink)) ··· 1153 1150 rc = CIFSPOSIXDelFile(xid, tcon, full_path, 1154 1151 SMB_POSIX_UNLINK_FILE_TARGET, cifs_sb->local_nls, 1155 1152 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 1156 - cFYI(1, "posix del rc %d", rc); 1153 + cifs_dbg(FYI, "posix del rc %d\n", rc); 1157 1154 if ((rc == 0) || (rc == -ENOENT)) 1158 1155 goto psx_del_no_retry; 1159 1156 } ··· 1323 1320 if (rc == -EOPNOTSUPP) 1324 1321 goto posix_mkdir_out; 1325 1322 else if (rc) { 1326 - cFYI(1, "posix mkdir returned 0x%x", rc); 1323 + cifs_dbg(FYI, "posix mkdir returned 0x%x\n", rc); 1327 1324 d_drop(dentry); 1328 1325 goto posix_mkdir_out; 1329 1326 } ··· 1345 1342 d_instantiate(dentry, newinode); 1346 1343 1347 1344 #ifdef CONFIG_CIFS_DEBUG2 1348 - cFYI(1, "instantiated dentry %p %s to inode %p", dentry, 1349 - dentry->d_name.name, newinode); 1345 + cifs_dbg(FYI, "instantiated dentry %p %s to inode %p\n", 1346 + dentry, dentry->d_name.name, newinode); 1350 1347 1351 1348 if (newinode->i_nlink != 2) 1352 - cFYI(1, "unexpected number of links %d", newinode->i_nlink); 1349 + cifs_dbg(FYI, "unexpected number of links %d\n", 1350 + newinode->i_nlink); 1353 1351 #endif 1354 1352 1355 1353 posix_mkdir_out: ··· 1372 1368 struct TCP_Server_Info *server; 1373 1369 char *full_path; 1374 1370 1375 - cFYI(1, "In cifs_mkdir, mode = 0x%hx inode = 0x%p", mode, inode); 1371 + cifs_dbg(FYI, "In cifs_mkdir, mode = 0x%hx inode = 0x%p\n", 1372 + mode, inode); 1376 1373 1377 1374 cifs_sb = CIFS_SB(inode->i_sb); 1378 1375 tlink = cifs_sb_tlink(cifs_sb); ··· 1407 1402 /* BB add setting the equivalent of mode via CreateX w/ACLs */ 1408 1403 rc = server->ops->mkdir(xid, tcon, full_path, cifs_sb); 1409 1404 if (rc) { 1410 - cFYI(1, "cifs_mkdir returned 0x%x", rc); 1405 + cifs_dbg(FYI, "cifs_mkdir returned 0x%x\n", rc); 1411 1406 d_drop(direntry); 1412 1407 goto mkdir_out; 1413 1408 } ··· 1437 1432 char *full_path = NULL; 1438 1433 struct cifsInodeInfo *cifsInode; 1439 1434 1440 - cFYI(1, "cifs_rmdir, inode = 0x%p", inode); 1435 + cifs_dbg(FYI, "cifs_rmdir, inode = 0x%p\n", inode); 1441 1436 1442 1437 xid = get_xid(); 1443 1438 ··· 1686 1681 if (inode->i_mapping && inode->i_mapping->nrpages != 0) { 1687 1682 rc = invalidate_inode_pages2(inode->i_mapping); 1688 1683 if (rc) { 1689 - cERROR(1, "%s: could not invalidate inode %p", __func__, 1690 - inode); 1684 + cifs_dbg(VFS, "%s: could not invalidate inode %p\n", 1685 + __func__, inode); 1691 1686 cifs_i->invalid_mapping = true; 1692 1687 } 1693 1688 } ··· 1737 1732 goto out; 1738 1733 } 1739 1734 1740 - cFYI(1, "Update attributes: %s inode 0x%p count %d dentry: 0x%p d_time " 1741 - "%ld jiffies %ld", full_path, inode, inode->i_count.counter, 1735 + cifs_dbg(FYI, "Update attributes: %s inode 0x%p count %d dentry: 0x%p d_time %ld jiffies %ld\n", 1736 + full_path, inode, inode->i_count.counter, 1742 1737 dentry, dentry->d_time, jiffies); 1743 1738 1744 1739 if (cifs_sb_master_tcon(CIFS_SB(sb))->unix_ext) ··· 1888 1883 else 1889 1884 rc = -ENOSYS; 1890 1885 cifsFileInfo_put(open_file); 1891 - cFYI(1, "SetFSize for attrs rc = %d", rc); 1886 + cifs_dbg(FYI, "SetFSize for attrs rc = %d\n", rc); 1892 1887 if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { 1893 1888 unsigned int bytes_written; 1894 1889 ··· 1899 1894 io_parms.length = attrs->ia_size; 1900 1895 rc = CIFSSMBWrite(xid, &io_parms, &bytes_written, 1901 1896 NULL, NULL, 1); 1902 - cFYI(1, "Wrt seteof rc %d", rc); 1897 + cifs_dbg(FYI, "Wrt seteof rc %d\n", rc); 1903 1898 } 1904 1899 } else 1905 1900 rc = -EINVAL; ··· 1925 1920 attrs->ia_size, cifs_sb, false); 1926 1921 else 1927 1922 rc = -ENOSYS; 1928 - cFYI(1, "SetEOF by path (setattrs) rc = %d", rc); 1923 + cifs_dbg(FYI, "SetEOF by path (setattrs) rc = %d\n", rc); 1929 1924 if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { 1930 1925 __u16 netfid; 1931 1926 int oplock = 0; ··· 1945 1940 io_parms.length = attrs->ia_size; 1946 1941 rc = CIFSSMBWrite(xid, &io_parms, &bytes_written, NULL, 1947 1942 NULL, 1); 1948 - cFYI(1, "wrt seteof rc %d", rc); 1943 + cifs_dbg(FYI, "wrt seteof rc %d\n", rc); 1949 1944 CIFSSMBClose(xid, tcon, netfid); 1950 1945 } 1951 1946 } ··· 1976 1971 struct cifs_unix_set_info_args *args = NULL; 1977 1972 struct cifsFileInfo *open_file; 1978 1973 1979 - cFYI(1, "setattr_unix on file %s attrs->ia_valid=0x%x", 1974 + cifs_dbg(FYI, "setattr_unix on file %s attrs->ia_valid=0x%x\n", 1980 1975 direntry->d_name.name, attrs->ia_valid); 1981 1976 1982 1977 xid = get_xid(); ··· 2119 2114 2120 2115 xid = get_xid(); 2121 2116 2122 - cFYI(1, "setattr on file %s attrs->iavalid 0x%x", 2117 + cifs_dbg(FYI, "setattr on file %s attrs->iavalid 0x%x\n", 2123 2118 direntry->d_name.name, attrs->ia_valid); 2124 2119 2125 2120 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) ··· 2171 2166 rc = id_mode_to_cifs_acl(inode, full_path, NO_CHANGE_64, 2172 2167 uid, gid); 2173 2168 if (rc) { 2174 - cFYI(1, "%s: Setting id failed with error: %d", 2175 - __func__, rc); 2169 + cifs_dbg(FYI, "%s: Setting id failed with error: %d\n", 2170 + __func__, rc); 2176 2171 goto cifs_setattr_exit; 2177 2172 } 2178 2173 } ··· 2193 2188 rc = id_mode_to_cifs_acl(inode, full_path, mode, 2194 2189 INVALID_UID, INVALID_GID); 2195 2190 if (rc) { 2196 - cFYI(1, "%s: Setting ACL failed with error: %d", 2197 - __func__, rc); 2191 + cifs_dbg(FYI, "%s: Setting ACL failed with error: %d\n", 2192 + __func__, rc); 2198 2193 goto cifs_setattr_exit; 2199 2194 } 2200 2195 } else ··· 2282 2277 #if 0 2283 2278 void cifs_delete_inode(struct inode *inode) 2284 2279 { 2285 - cFYI(1, "In cifs_delete_inode, inode = 0x%p", inode); 2280 + cifs_dbg(FYI, "In cifs_delete_inode, inode = 0x%p\n", inode); 2286 2281 /* may have to add back in if and when safe distributed caching of 2287 2282 directories added e.g. via FindNotify */ 2288 2283 }
+3 -3
fs/cifs/ioctl.c
··· 44 44 45 45 xid = get_xid(); 46 46 47 - cFYI(1, "ioctl file %p cmd %u arg %lu", filep, command, arg); 47 + cifs_dbg(FYI, "ioctl file %p cmd %u arg %lu\n", filep, command, arg); 48 48 49 49 cifs_sb = CIFS_SB(inode->i_sb); 50 50 ··· 83 83 * &ExtAttrMask); 84 84 */ 85 85 } 86 - cFYI(1, "set flags not implemented yet"); 86 + cifs_dbg(FYI, "set flags not implemented yet\n"); 87 87 break; 88 88 #endif /* CONFIG_CIFS_POSIX */ 89 89 default: 90 - cFYI(1, "unsupported ioctl"); 90 + cifs_dbg(FYI, "unsupported ioctl\n"); 91 91 break; 92 92 } 93 93
+12 -12
fs/cifs/link.c
··· 56 56 md5 = crypto_alloc_shash("md5", 0, 0); 57 57 if (IS_ERR(md5)) { 58 58 rc = PTR_ERR(md5); 59 - cERROR(1, "%s: Crypto md5 allocation error %d", __func__, rc); 59 + cifs_dbg(VFS, "%s: Crypto md5 allocation error %d\n", 60 + __func__, rc); 60 61 return rc; 61 62 } 62 63 size = sizeof(struct shash_desc) + crypto_shash_descsize(md5); 63 64 sdescmd5 = kmalloc(size, GFP_KERNEL); 64 65 if (!sdescmd5) { 65 66 rc = -ENOMEM; 66 - cERROR(1, "%s: Memory allocation failure", __func__); 67 67 goto symlink_hash_err; 68 68 } 69 69 sdescmd5->shash.tfm = md5; ··· 71 71 72 72 rc = crypto_shash_init(&sdescmd5->shash); 73 73 if (rc) { 74 - cERROR(1, "%s: Could not init md5 shash", __func__); 74 + cifs_dbg(VFS, "%s: Could not init md5 shash\n", __func__); 75 75 goto symlink_hash_err; 76 76 } 77 77 rc = crypto_shash_update(&sdescmd5->shash, link_str, link_len); 78 78 if (rc) { 79 - cERROR(1, "%s: Could not update with link_str", __func__); 79 + cifs_dbg(VFS, "%s: Could not update with link_str\n", __func__); 80 80 goto symlink_hash_err; 81 81 } 82 82 rc = crypto_shash_final(&sdescmd5->shash, md5_hash); 83 83 if (rc) 84 - cERROR(1, "%s: Could not generate md5 hash", __func__); 84 + cifs_dbg(VFS, "%s: Could not generate md5 hash\n", __func__); 85 85 86 86 symlink_hash_err: 87 87 crypto_free_shash(md5); ··· 115 115 116 116 rc = symlink_hash(link_len, link_str, md5_hash); 117 117 if (rc) { 118 - cFYI(1, "%s: MD5 hash failure: %d", __func__, rc); 118 + cifs_dbg(FYI, "%s: MD5 hash failure: %d\n", __func__, rc); 119 119 return rc; 120 120 } 121 121 ··· 154 154 155 155 rc = symlink_hash(link_len, link_str, md5_hash); 156 156 if (rc) { 157 - cFYI(1, "%s: MD5 hash failure: %d", __func__, rc); 157 + cifs_dbg(FYI, "%s: MD5 hash failure: %d\n", __func__, rc); 158 158 return rc; 159 159 } 160 160 ··· 521 521 if (!full_path) 522 522 goto out; 523 523 524 - cFYI(1, "Full path: %s inode = 0x%p", full_path, inode); 524 + cifs_dbg(FYI, "Full path: %s inode = 0x%p\n", full_path, inode); 525 525 526 526 rc = -EACCES; 527 527 /* ··· 578 578 goto symlink_exit; 579 579 } 580 580 581 - cFYI(1, "Full path: %s", full_path); 582 - cFYI(1, "symname is %s", symname); 581 + cifs_dbg(FYI, "Full path: %s\n", full_path); 582 + cifs_dbg(FYI, "symname is %s\n", symname); 583 583 584 584 /* BB what if DFS and this volume is on different share? BB */ 585 585 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) ··· 601 601 inode->i_sb, xid, NULL); 602 602 603 603 if (rc != 0) { 604 - cFYI(1, "Create symlink ok, getinodeinfo fail rc = %d", 605 - rc); 604 + cifs_dbg(FYI, "Create symlink ok, getinodeinfo fail rc = %d\n", 605 + rc); 606 606 } else { 607 607 d_instantiate(direntry, newinode); 608 608 }
+37 -41
fs/cifs/misc.c
··· 54 54 if (GlobalTotalActiveXid > GlobalMaxActiveXid) 55 55 GlobalMaxActiveXid = GlobalTotalActiveXid; 56 56 if (GlobalTotalActiveXid > 65000) 57 - cFYI(1, "warning: more than 65000 requests active"); 57 + cifs_dbg(FYI, "warning: more than 65000 requests active\n"); 58 58 xid = GlobalCurrentXid++; 59 59 spin_unlock(&GlobalMid_Lock); 60 60 return xid; ··· 91 91 sesInfoFree(struct cifs_ses *buf_to_free) 92 92 { 93 93 if (buf_to_free == NULL) { 94 - cFYI(1, "Null buffer passed to sesInfoFree"); 94 + cifs_dbg(FYI, "Null buffer passed to sesInfoFree\n"); 95 95 return; 96 96 } 97 97 ··· 130 130 tconInfoFree(struct cifs_tcon *buf_to_free) 131 131 { 132 132 if (buf_to_free == NULL) { 133 - cFYI(1, "Null buffer passed to tconInfoFree"); 133 + cifs_dbg(FYI, "Null buffer passed to tconInfoFree\n"); 134 134 return; 135 135 } 136 136 atomic_dec(&tconInfoAllocCount); ··· 180 180 cifs_buf_release(void *buf_to_free) 181 181 { 182 182 if (buf_to_free == NULL) { 183 - /* cFYI(1, "Null buffer passed to cifs_buf_release");*/ 183 + /* cifs_dbg(FYI, "Null buffer passed to cifs_buf_release\n");*/ 184 184 return; 185 185 } 186 186 mempool_free(buf_to_free, cifs_req_poolp); ··· 216 216 { 217 217 218 218 if (buf_to_free == NULL) { 219 - cFYI(1, "Null buffer passed to cifs_small_buf_release"); 219 + cifs_dbg(FYI, "Null buffer passed to cifs_small_buf_release\n"); 220 220 return; 221 221 } 222 222 mempool_free(buf_to_free, cifs_sm_req_poolp); ··· 282 282 { 283 283 /* does it have the right SMB "signature" ? */ 284 284 if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff)) { 285 - cERROR(1, "Bad protocol string signature header 0x%x", 286 - *(unsigned int *)smb->Protocol); 285 + cifs_dbg(VFS, "Bad protocol string signature header 0x%x\n", 286 + *(unsigned int *)smb->Protocol); 287 287 return 1; 288 288 } 289 289 290 290 /* Make sure that message ids match */ 291 291 if (mid != smb->Mid) { 292 - cERROR(1, "Mids do not match. received=%u expected=%u", 293 - smb->Mid, mid); 292 + cifs_dbg(VFS, "Mids do not match. received=%u expected=%u\n", 293 + smb->Mid, mid); 294 294 return 1; 295 295 } 296 296 ··· 302 302 if (smb->Command == SMB_COM_LOCKING_ANDX) 303 303 return 0; 304 304 305 - cERROR(1, "Server sent request, not response. mid=%u", smb->Mid); 305 + cifs_dbg(VFS, "Server sent request, not response. mid=%u\n", smb->Mid); 306 306 return 1; 307 307 } 308 308 ··· 313 313 __u16 mid = smb->Mid; 314 314 __u32 rfclen = be32_to_cpu(smb->smb_buf_length); 315 315 __u32 clc_len; /* calculated length */ 316 - cFYI(0, "checkSMB Length: 0x%x, smb_buf_length: 0x%x", 317 - total_read, rfclen); 316 + cifs_dbg(FYI, "checkSMB Length: 0x%x, smb_buf_length: 0x%x\n", 317 + total_read, rfclen); 318 318 319 319 /* is this frame too small to even get to a BCC? */ 320 320 if (total_read < 2 + sizeof(struct smb_hdr)) { ··· 340 340 tmp[sizeof(struct smb_hdr)+1] = 0; 341 341 return 0; 342 342 } 343 - cERROR(1, "rcvd invalid byte count (bcc)"); 343 + cifs_dbg(VFS, "rcvd invalid byte count (bcc)\n"); 344 344 } else { 345 - cERROR(1, "Length less than smb header size"); 345 + cifs_dbg(VFS, "Length less than smb header size\n"); 346 346 } 347 347 return -EIO; 348 348 } ··· 353 353 clc_len = smbCalcSize(smb); 354 354 355 355 if (4 + rfclen != total_read) { 356 - cERROR(1, "Length read does not match RFC1001 length %d", 357 - rfclen); 356 + cifs_dbg(VFS, "Length read does not match RFC1001 length %d\n", 357 + rfclen); 358 358 return -EIO; 359 359 } 360 360 ··· 365 365 if (((4 + rfclen) & 0xFFFF) == (clc_len & 0xFFFF)) 366 366 return 0; /* bcc wrapped */ 367 367 } 368 - cFYI(1, "Calculated size %u vs length %u mismatch for mid=%u", 369 - clc_len, 4 + rfclen, smb->Mid); 368 + cifs_dbg(FYI, "Calculated size %u vs length %u mismatch for mid=%u\n", 369 + clc_len, 4 + rfclen, smb->Mid); 370 370 371 371 if (4 + rfclen < clc_len) { 372 - cERROR(1, "RFC1001 size %u smaller than SMB for mid=%u", 373 - rfclen, smb->Mid); 372 + cifs_dbg(VFS, "RFC1001 size %u smaller than SMB for mid=%u\n", 373 + rfclen, smb->Mid); 374 374 return -EIO; 375 375 } else if (rfclen > clc_len + 512) { 376 376 /* ··· 382 382 * trailing data, we choose limit the amount of extra 383 383 * data to 512 bytes. 384 384 */ 385 - cERROR(1, "RFC1001 size %u more than 512 bytes larger " 386 - "than SMB for mid=%u", rfclen, smb->Mid); 385 + cifs_dbg(VFS, "RFC1001 size %u more than 512 bytes larger than SMB for mid=%u\n", 386 + rfclen, smb->Mid); 387 387 return -EIO; 388 388 } 389 389 } ··· 401 401 struct cifsInodeInfo *pCifsInode; 402 402 struct cifsFileInfo *netfile; 403 403 404 - cFYI(1, "Checking for oplock break or dnotify response"); 404 + cifs_dbg(FYI, "Checking for oplock break or dnotify response\n"); 405 405 if ((pSMB->hdr.Command == SMB_COM_NT_TRANSACT) && 406 406 (pSMB->hdr.Flags & SMBFLG_RESPONSE)) { 407 407 struct smb_com_transaction_change_notify_rsp *pSMBr = ··· 413 413 414 414 pnotify = (struct file_notify_information *) 415 415 ((char *)&pSMBr->hdr.Protocol + data_offset); 416 - cFYI(1, "dnotify on %s Action: 0x%x", 416 + cifs_dbg(FYI, "dnotify on %s Action: 0x%x\n", 417 417 pnotify->FileName, pnotify->Action); 418 418 /* cifs_dump_mem("Rcvd notify Data: ",buf, 419 419 sizeof(struct smb_hdr)+60); */ 420 420 return true; 421 421 } 422 422 if (pSMBr->hdr.Status.CifsError) { 423 - cFYI(1, "notify err 0x%d", 424 - pSMBr->hdr.Status.CifsError); 423 + cifs_dbg(FYI, "notify err 0x%d\n", 424 + pSMBr->hdr.Status.CifsError); 425 425 return true; 426 426 } 427 427 return false; ··· 435 435 large dirty files cached on the client */ 436 436 if ((NT_STATUS_INVALID_HANDLE) == 437 437 le32_to_cpu(pSMB->hdr.Status.CifsError)) { 438 - cFYI(1, "invalid handle on oplock break"); 438 + cifs_dbg(FYI, "invalid handle on oplock break\n"); 439 439 return true; 440 440 } else if (ERRbadfid == 441 441 le16_to_cpu(pSMB->hdr.Status.DosError.Error)) { ··· 447 447 if (pSMB->hdr.WordCount != 8) 448 448 return false; 449 449 450 - cFYI(1, "oplock type 0x%d level 0x%d", 450 + cifs_dbg(FYI, "oplock type 0x%d level 0x%d\n", 451 451 pSMB->LockType, pSMB->OplockLevel); 452 452 if (!(pSMB->LockType & LOCKING_ANDX_OPLOCK_RELEASE)) 453 453 return false; ··· 469 469 if (pSMB->Fid != netfile->fid.netfid) 470 470 continue; 471 471 472 - cFYI(1, "file id match, oplock break"); 472 + cifs_dbg(FYI, "file id match, oplock break\n"); 473 473 pCifsInode = CIFS_I(netfile->dentry->d_inode); 474 474 475 475 cifs_set_oplock_level(pCifsInode, ··· 484 484 } 485 485 spin_unlock(&cifs_file_list_lock); 486 486 spin_unlock(&cifs_tcp_ses_lock); 487 - cFYI(1, "No matching file for oplock break"); 487 + cifs_dbg(FYI, "No matching file for oplock break\n"); 488 488 return true; 489 489 } 490 490 } 491 491 spin_unlock(&cifs_tcp_ses_lock); 492 - cFYI(1, "Can not process oplock break for non-existent connection"); 492 + cifs_dbg(FYI, "Can not process oplock break for non-existent connection\n"); 493 493 return true; 494 494 } 495 495 ··· 536 536 { 537 537 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { 538 538 cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; 539 - cERROR(1, "Autodisabling the use of server inode numbers on " 540 - "%s. This server doesn't seem to support them " 541 - "properly. Hardlinks will not be recognized on this " 542 - "mount. Consider mounting with the \"noserverino\" " 543 - "option to silence this message.", 544 - cifs_sb_master_tcon(cifs_sb)->treeName); 539 + cifs_dbg(VFS, "Autodisabling the use of server inode numbers on %s. This server doesn't seem to support them properly. Hardlinks will not be recognized on this mount. Consider mounting with the \"noserverino\" option to silence this message.\n", 540 + cifs_sb_master_tcon(cifs_sb)->treeName); 545 541 } 546 542 } 547 543 ··· 548 552 if (oplock == OPLOCK_EXCLUSIVE) { 549 553 cinode->clientCanCacheAll = true; 550 554 cinode->clientCanCacheRead = true; 551 - cFYI(1, "Exclusive Oplock granted on inode %p", 552 - &cinode->vfs_inode); 555 + cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n", 556 + &cinode->vfs_inode); 553 557 } else if (oplock == OPLOCK_READ) { 554 558 cinode->clientCanCacheAll = false; 555 559 cinode->clientCanCacheRead = true; 556 - cFYI(1, "Level II Oplock granted on inode %p", 557 - &cinode->vfs_inode); 560 + cifs_dbg(FYI, "Level II Oplock granted on inode %p\n", 561 + &cinode->vfs_inode); 558 562 } else { 559 563 cinode->clientCanCacheAll = false; 560 564 cinode->clientCanCacheRead = false;
+8 -8
fs/cifs/netmisc.c
··· 150 150 else if (address_family == AF_INET6) 151 151 ret = in6_pton(cp, len, dst , '\\', NULL); 152 152 153 - cFYI(DBG2, "address conversion returned %d for %*.*s", 154 - ret, len, len, cp); 153 + cifs_dbg(NOISY, "address conversion returned %d for %*.*s\n", 154 + ret, len, len, cp); 155 155 if (ret > 0) 156 156 ret = 1; 157 157 return ret; ··· 887 887 } 888 888 /* else ERRHRD class errors or junk - return EIO */ 889 889 890 - cFYI(1, "Mapping smb error code 0x%x to POSIX err %d", 890 + cifs_dbg(FYI, "Mapping smb error code 0x%x to POSIX err %d\n", 891 891 le32_to_cpu(smb->Status.CifsError), rc); 892 892 893 893 /* generic corrective action e.g. reconnect SMB session on ··· 951 951 SMB_TIME *st = (SMB_TIME *)&time; 952 952 SMB_DATE *sd = (SMB_DATE *)&date; 953 953 954 - cFYI(1, "date %d time %d", date, time); 954 + cifs_dbg(FYI, "date %d time %d\n", date, time); 955 955 956 956 sec = 2 * st->TwoSeconds; 957 957 min = st->Minutes; 958 958 if ((sec > 59) || (min > 59)) 959 - cERROR(1, "illegal time min %d sec %d", min, sec); 959 + cifs_dbg(VFS, "illegal time min %d sec %d\n", min, sec); 960 960 sec += (min * 60); 961 961 sec += 60 * 60 * st->Hours; 962 962 if (st->Hours > 24) 963 - cERROR(1, "illegal hours %d", st->Hours); 963 + cifs_dbg(VFS, "illegal hours %d\n", st->Hours); 964 964 days = sd->Day; 965 965 month = sd->Month; 966 966 if ((days > 31) || (month > 12)) { 967 - cERROR(1, "illegal date, month %d day: %d", month, days); 967 + cifs_dbg(VFS, "illegal date, month %d day: %d\n", month, days); 968 968 if (month > 12) 969 969 month = 12; 970 970 } ··· 990 990 991 991 ts.tv_sec = sec + offset; 992 992 993 - /* cFYI(1, "sec after cnvrt dos to unix time %d",sec); */ 993 + /* cifs_dbg(FYI, "sec after cnvrt dos to unix time %d\n",sec); */ 994 994 995 995 ts.tv_nsec = 0; 996 996 return ts;
+38 -39
fs/cifs/readdir.c
··· 48 48 if (file) { 49 49 cf = file->private_data; 50 50 if (cf == NULL) { 51 - cFYI(1, "empty cifs private file data"); 51 + cifs_dbg(FYI, "empty cifs private file data\n"); 52 52 return; 53 53 } 54 54 if (cf->invalidHandle) 55 - cFYI(1, "invalid handle"); 55 + cifs_dbg(FYI, "invalid handle\n"); 56 56 if (cf->srch_inf.endOfSearch) 57 - cFYI(1, "end of search"); 57 + cifs_dbg(FYI, "end of search\n"); 58 58 if (cf->srch_inf.emptyDir) 59 - cFYI(1, "empty dir"); 59 + cifs_dbg(FYI, "empty dir\n"); 60 60 } 61 61 } 62 62 #else ··· 80 80 struct super_block *sb = parent->d_inode->i_sb; 81 81 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 82 82 83 - cFYI(1, "%s: for %s", __func__, name->name); 83 + cifs_dbg(FYI, "%s: for %s\n", __func__, name->name); 84 84 85 85 dentry = d_hash_and_lookup(parent, name); 86 86 if (unlikely(IS_ERR(dentry))) ··· 233 233 fid, 234 234 cifs_sb->local_nls); 235 235 if (CIFSSMBClose(xid, ptcon, fid)) { 236 - cFYI(1, "Error closing temporary reparsepoint open"); 236 + cifs_dbg(FYI, "Error closing temporary reparsepoint open\n"); 237 237 } 238 238 } 239 239 } ··· 285 285 goto error_exit; 286 286 } 287 287 288 - cFYI(1, "Full path: %s start at: %lld", full_path, file->f_pos); 288 + cifs_dbg(FYI, "Full path: %s start at: %lld\n", full_path, file->f_pos); 289 289 290 290 ffirst_retry: 291 291 /* test for Unix extensions */ ··· 336 336 if (ustr[len] == 0) 337 337 return len << 1; 338 338 } 339 - cFYI(1, "Unicode string longer than PATH_MAX found"); 339 + cifs_dbg(FYI, "Unicode string longer than PATH_MAX found\n"); 340 340 return len << 1; 341 341 } 342 342 ··· 353 353 pfData->FileNameLength; 354 354 } else 355 355 new_entry = old_entry + le32_to_cpu(pDirInfo->NextEntryOffset); 356 - cFYI(1, "new entry %p old entry %p", new_entry, old_entry); 356 + cifs_dbg(FYI, "new entry %p old entry %p\n", new_entry, old_entry); 357 357 /* validate that new_entry is not past end of SMB */ 358 358 if (new_entry >= end_of_smb) { 359 - cERROR(1, "search entry %p began after end of SMB %p old entry %p", 360 - new_entry, end_of_smb, old_entry); 359 + cifs_dbg(VFS, "search entry %p began after end of SMB %p old entry %p\n", 360 + new_entry, end_of_smb, old_entry); 361 361 return NULL; 362 362 } else if (((level == SMB_FIND_FILE_INFO_STANDARD) && 363 363 (new_entry + sizeof(FIND_FILE_STANDARD_INFO) > end_of_smb)) 364 364 || ((level != SMB_FIND_FILE_INFO_STANDARD) && 365 365 (new_entry + sizeof(FILE_DIRECTORY_INFO) > end_of_smb))) { 366 - cERROR(1, "search entry %p extends after end of SMB %p", 367 - new_entry, end_of_smb); 366 + cifs_dbg(VFS, "search entry %p extends after end of SMB %p\n", 367 + new_entry, end_of_smb); 368 368 return NULL; 369 369 } else 370 370 return new_entry; ··· 457 457 cifs_fill_dirent_std(de, info); 458 458 break; 459 459 default: 460 - cFYI(1, "Unknown findfirst level %d", level); 460 + cifs_dbg(FYI, "Unknown findfirst level %d\n", level); 461 461 return -EINVAL; 462 462 } 463 463 ··· 572 572 if (((index_to_find < cfile->srch_inf.index_of_last_entry) && 573 573 is_dir_changed(file)) || (index_to_find < first_entry_in_buffer)) { 574 574 /* close and restart search */ 575 - cFYI(1, "search backing up - close and restart search"); 575 + cifs_dbg(FYI, "search backing up - close and restart search\n"); 576 576 spin_lock(&cifs_file_list_lock); 577 577 if (!cfile->srch_inf.endOfSearch && !cfile->invalidHandle) { 578 578 cfile->invalidHandle = true; ··· 582 582 } else 583 583 spin_unlock(&cifs_file_list_lock); 584 584 if (cfile->srch_inf.ntwrk_buf_start) { 585 - cFYI(1, "freeing SMB ff cache buf on search rewind"); 585 + cifs_dbg(FYI, "freeing SMB ff cache buf on search rewind\n"); 586 586 if (cfile->srch_inf.smallBuf) 587 587 cifs_small_buf_release(cfile->srch_inf. 588 588 ntwrk_buf_start); ··· 593 593 } 594 594 rc = initiate_cifs_search(xid, file); 595 595 if (rc) { 596 - cFYI(1, "error %d reinitiating a search on rewind", 596 + cifs_dbg(FYI, "error %d reinitiating a search on rewind\n", 597 597 rc); 598 598 return rc; 599 599 } ··· 608 608 609 609 while ((index_to_find >= cfile->srch_inf.index_of_last_entry) && 610 610 (rc == 0) && !cfile->srch_inf.endOfSearch) { 611 - cFYI(1, "calling findnext2"); 611 + cifs_dbg(FYI, "calling findnext2\n"); 612 612 rc = server->ops->query_dir_next(xid, tcon, &cfile->fid, 613 613 search_flags, 614 614 &cfile->srch_inf); ··· 631 631 first_entry_in_buffer = cfile->srch_inf.index_of_last_entry 632 632 - cfile->srch_inf.entries_in_buffer; 633 633 pos_in_buf = index_to_find - first_entry_in_buffer; 634 - cFYI(1, "found entry - pos_in_buf %d", pos_in_buf); 634 + cifs_dbg(FYI, "found entry - pos_in_buf %d\n", pos_in_buf); 635 635 636 636 for (i = 0; (i < (pos_in_buf)) && (cur_ent != NULL); i++) { 637 637 /* go entry by entry figuring out which is first */ ··· 640 640 } 641 641 if ((cur_ent == NULL) && (i < pos_in_buf)) { 642 642 /* BB fixme - check if we should flag this error */ 643 - cERROR(1, "reached end of buf searching for pos in buf" 644 - " %d index to find %lld rc %d", pos_in_buf, 645 - index_to_find, rc); 643 + cifs_dbg(VFS, "reached end of buf searching for pos in buf %d index to find %lld rc %d\n", 644 + pos_in_buf, index_to_find, rc); 646 645 } 647 646 rc = 0; 648 647 *current_entry = cur_ent; 649 648 } else { 650 - cFYI(1, "index not in buffer - could not findnext into it"); 649 + cifs_dbg(FYI, "index not in buffer - could not findnext into it\n"); 651 650 return 0; 652 651 } 653 652 654 653 if (pos_in_buf >= cfile->srch_inf.entries_in_buffer) { 655 - cFYI(1, "can not return entries pos_in_buf beyond last"); 654 + cifs_dbg(FYI, "can not return entries pos_in_buf beyond last\n"); 656 655 *num_to_ret = 0; 657 656 } else 658 657 *num_to_ret = cfile->srch_inf.entries_in_buffer - pos_in_buf; ··· 677 678 return rc; 678 679 679 680 if (de.namelen > max_len) { 680 - cERROR(1, "bad search response length %zd past smb end", 681 - de.namelen); 681 + cifs_dbg(VFS, "bad search response length %zd past smb end\n", 682 + de.namelen); 682 683 return -EINVAL; 683 684 } 684 685 ··· 767 768 */ 768 769 if (file->private_data == NULL) { 769 770 rc = initiate_cifs_search(xid, file); 770 - cFYI(1, "initiate cifs search rc %d", rc); 771 + cifs_dbg(FYI, "initiate cifs search rc %d\n", rc); 771 772 if (rc) 772 773 goto rddir2_exit; 773 774 } ··· 776 777 case 0: 777 778 if (filldir(direntry, ".", 1, file->f_pos, 778 779 file_inode(file)->i_ino, DT_DIR) < 0) { 779 - cERROR(1, "Filldir for current dir failed"); 780 + cifs_dbg(VFS, "Filldir for current dir failed\n"); 780 781 rc = -ENOMEM; 781 782 break; 782 783 } ··· 784 785 case 1: 785 786 if (filldir(direntry, "..", 2, file->f_pos, 786 787 parent_ino(file->f_path.dentry), DT_DIR) < 0) { 787 - cERROR(1, "Filldir for parent dir failed"); 788 + cifs_dbg(VFS, "Filldir for parent dir failed\n"); 788 789 rc = -ENOMEM; 789 790 break; 790 791 } ··· 803 804 cifsFile = file->private_data; 804 805 if (cifsFile->srch_inf.endOfSearch) { 805 806 if (cifsFile->srch_inf.emptyDir) { 806 - cFYI(1, "End of search, empty dir"); 807 + cifs_dbg(FYI, "End of search, empty dir\n"); 807 808 rc = 0; 808 809 break; 809 810 } ··· 816 817 rc = find_cifs_entry(xid, tcon, file, &current_entry, 817 818 &num_to_fill); 818 819 if (rc) { 819 - cFYI(1, "fce error %d", rc); 820 + cifs_dbg(FYI, "fce error %d\n", rc); 820 821 goto rddir2_exit; 821 822 } else if (current_entry != NULL) { 822 - cFYI(1, "entry %lld found", file->f_pos); 823 + cifs_dbg(FYI, "entry %lld found\n", file->f_pos); 823 824 } else { 824 - cFYI(1, "could not find entry"); 825 + cifs_dbg(FYI, "could not find entry\n"); 825 826 goto rddir2_exit; 826 827 } 827 - cFYI(1, "loop through %d times filling dir for net buf %p", 828 - num_to_fill, cifsFile->srch_inf.ntwrk_buf_start); 828 + cifs_dbg(FYI, "loop through %d times filling dir for net buf %p\n", 829 + num_to_fill, cifsFile->srch_inf.ntwrk_buf_start); 829 830 max_len = tcon->ses->server->ops->calc_smb_size( 830 831 cifsFile->srch_inf.ntwrk_buf_start); 831 832 end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + max_len; ··· 839 840 for (i = 0; (i < num_to_fill) && (rc == 0); i++) { 840 841 if (current_entry == NULL) { 841 842 /* evaluate whether this case is an error */ 842 - cERROR(1, "past SMB end, num to fill %d i %d", 843 - num_to_fill, i); 843 + cifs_dbg(VFS, "past SMB end, num to fill %d i %d\n", 844 + num_to_fill, i); 844 845 break; 845 846 } 846 847 /* ··· 857 858 file->f_pos++; 858 859 if (file->f_pos == 859 860 cifsFile->srch_inf.index_of_last_entry) { 860 - cFYI(1, "last entry in buf at pos %lld %s", 861 - file->f_pos, tmp_buf); 861 + cifs_dbg(FYI, "last entry in buf at pos %lld %s\n", 862 + file->f_pos, tmp_buf); 862 863 cifs_save_resume_key(current_entry, cifsFile); 863 864 break; 864 865 } else
+41 -36
fs/cifs/sess.c
··· 283 283 int len; 284 284 char *data = *pbcc_area; 285 285 286 - cFYI(1, "bleft %d", bleft); 286 + cifs_dbg(FYI, "bleft %d\n", bleft); 287 287 288 288 kfree(ses->serverOS); 289 289 ses->serverOS = cifs_strndup_from_utf16(data, bleft, true, nls_cp); 290 - cFYI(1, "serverOS=%s", ses->serverOS); 290 + cifs_dbg(FYI, "serverOS=%s\n", ses->serverOS); 291 291 len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; 292 292 data += len; 293 293 bleft -= len; ··· 296 296 297 297 kfree(ses->serverNOS); 298 298 ses->serverNOS = cifs_strndup_from_utf16(data, bleft, true, nls_cp); 299 - cFYI(1, "serverNOS=%s", ses->serverNOS); 299 + cifs_dbg(FYI, "serverNOS=%s\n", ses->serverNOS); 300 300 len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; 301 301 data += len; 302 302 bleft -= len; ··· 305 305 306 306 kfree(ses->serverDomain); 307 307 ses->serverDomain = cifs_strndup_from_utf16(data, bleft, true, nls_cp); 308 - cFYI(1, "serverDomain=%s", ses->serverDomain); 308 + cifs_dbg(FYI, "serverDomain=%s\n", ses->serverDomain); 309 309 310 310 return; 311 311 } ··· 318 318 int len; 319 319 char *bcc_ptr = *pbcc_area; 320 320 321 - cFYI(1, "decode sessetup ascii. bleft %d", bleft); 321 + cifs_dbg(FYI, "decode sessetup ascii. bleft %d\n", bleft); 322 322 323 323 len = strnlen(bcc_ptr, bleft); 324 324 if (len >= bleft) ··· 330 330 if (ses->serverOS) 331 331 strncpy(ses->serverOS, bcc_ptr, len); 332 332 if (strncmp(ses->serverOS, "OS/2", 4) == 0) { 333 - cFYI(1, "OS/2 server"); 333 + cifs_dbg(FYI, "OS/2 server\n"); 334 334 ses->flags |= CIFS_SES_OS2; 335 335 } 336 336 ··· 359 359 /* BB For newer servers which do not support Unicode, 360 360 but thus do return domain here we could add parsing 361 361 for it later, but it is not very important */ 362 - cFYI(1, "ascii: bytes left %d", bleft); 362 + cifs_dbg(FYI, "ascii: bytes left %d\n", bleft); 363 363 364 364 return rc; 365 365 } ··· 373 373 CHALLENGE_MESSAGE *pblob = (CHALLENGE_MESSAGE *)bcc_ptr; 374 374 375 375 if (blob_len < sizeof(CHALLENGE_MESSAGE)) { 376 - cERROR(1, "challenge blob len %d too small", blob_len); 376 + cifs_dbg(VFS, "challenge blob len %d too small\n", blob_len); 377 377 return -EINVAL; 378 378 } 379 379 380 380 if (memcmp(pblob->Signature, "NTLMSSP", 8)) { 381 - cERROR(1, "blob signature incorrect %s", pblob->Signature); 381 + cifs_dbg(VFS, "blob signature incorrect %s\n", 382 + pblob->Signature); 382 383 return -EINVAL; 383 384 } 384 385 if (pblob->MessageType != NtLmChallenge) { 385 - cERROR(1, "Incorrect message type %d", pblob->MessageType); 386 + cifs_dbg(VFS, "Incorrect message type %d\n", 387 + pblob->MessageType); 386 388 return -EINVAL; 387 389 } 388 390 ··· 397 395 tioffset = le32_to_cpu(pblob->TargetInfoArray.BufferOffset); 398 396 tilen = le16_to_cpu(pblob->TargetInfoArray.Length); 399 397 if (tioffset > blob_len || tioffset + tilen > blob_len) { 400 - cERROR(1, "tioffset + tilen too high %u + %u", tioffset, tilen); 398 + cifs_dbg(VFS, "tioffset + tilen too high %u + %u", 399 + tioffset, tilen); 401 400 return -EINVAL; 402 401 } 403 402 if (tilen) { 404 - ses->auth_key.response = kmalloc(tilen, GFP_KERNEL); 403 + ses->auth_key.response = kmemdup(bcc_ptr + tioffset, tilen, 404 + GFP_KERNEL); 405 405 if (!ses->auth_key.response) { 406 - cERROR(1, "Challenge target info allocation failure"); 406 + cifs_dbg(VFS, "Challenge target info alloc failure"); 407 407 return -ENOMEM; 408 408 } 409 - memcpy(ses->auth_key.response, bcc_ptr + tioffset, tilen); 410 409 ses->auth_key.len = tilen; 411 410 } 412 411 ··· 489 486 sec_blob->NtChallengeResponse.BufferOffset = cpu_to_le32(tmp - pbuffer); 490 487 rc = setup_ntlmv2_rsp(ses, nls_cp); 491 488 if (rc) { 492 - cERROR(1, "Error %d during NTLMSSP authentication", rc); 489 + cifs_dbg(VFS, "Error %d during NTLMSSP authentication\n", rc); 493 490 goto setup_ntlmv2_ret; 494 491 } 495 492 memcpy(tmp, ses->auth_key.response + CIFS_SESS_KEY_SIZE, ··· 583 580 return -EINVAL; 584 581 585 582 type = ses->server->secType; 586 - cFYI(1, "sess setup type %d", type); 583 + cifs_dbg(FYI, "sess setup type %d\n", type); 587 584 if (type == RawNTLMSSP) { 588 585 /* if memory allocation is successful, caller of this function 589 586 * frees it. ··· 677 674 changed to do higher than lanman dialect and 678 675 we reconnected would we ever calc signing_key? */ 679 676 680 - cFYI(1, "Negotiating LANMAN setting up strings"); 677 + cifs_dbg(FYI, "Negotiating LANMAN setting up strings\n"); 681 678 /* Unicode not allowed for LANMAN dialects */ 682 679 ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); 683 680 #endif ··· 691 688 /* calculate ntlm response and session key */ 692 689 rc = setup_ntlm_response(ses, nls_cp); 693 690 if (rc) { 694 - cERROR(1, "Error %d during NTLM authentication", rc); 691 + cifs_dbg(VFS, "Error %d during NTLM authentication\n", 692 + rc); 695 693 goto ssetup_exit; 696 694 } 697 695 ··· 722 718 /* calculate nlmv2 response and session key */ 723 719 rc = setup_ntlmv2_rsp(ses, nls_cp); 724 720 if (rc) { 725 - cERROR(1, "Error %d during NTLMv2 authentication", rc); 721 + cifs_dbg(VFS, "Error %d during NTLMv2 authentication\n", 722 + rc); 726 723 goto ssetup_exit; 727 724 } 728 725 memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE, ··· 759 754 /* check version field to make sure that cifs.upcall is 760 755 sending us a response in an expected form */ 761 756 if (msg->version != CIFS_SPNEGO_UPCALL_VERSION) { 762 - cERROR(1, "incorrect version of cifs.upcall (expected" 763 - " %d but got %d)", 757 + cifs_dbg(VFS, "incorrect version of cifs.upcall " 758 + "expected %d but got %d)", 764 759 CIFS_SPNEGO_UPCALL_VERSION, msg->version); 765 760 rc = -EKEYREJECTED; 766 761 goto ssetup_exit; 767 762 } 768 763 769 - ses->auth_key.response = kmalloc(msg->sesskey_len, GFP_KERNEL); 764 + ses->auth_key.response = kmemdup(msg->data, msg->sesskey_len, 765 + GFP_KERNEL); 770 766 if (!ses->auth_key.response) { 771 - cERROR(1, "Kerberos can't allocate (%u bytes) memory", 767 + cifs_dbg(VFS, "Kerberos can't allocate (%u bytes) memory", 772 768 msg->sesskey_len); 773 769 rc = -ENOMEM; 774 770 goto ssetup_exit; 775 771 } 776 - memcpy(ses->auth_key.response, msg->data, msg->sesskey_len); 777 772 ses->auth_key.len = msg->sesskey_len; 778 773 779 774 pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; ··· 795 790 /* BB: is this right? */ 796 791 ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); 797 792 #else /* ! CONFIG_CIFS_UPCALL */ 798 - cERROR(1, "Kerberos negotiated but upcall support disabled!"); 793 + cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n"); 799 794 rc = -ENOSYS; 800 795 goto ssetup_exit; 801 796 #endif /* CONFIG_CIFS_UPCALL */ 802 797 } else if (type == RawNTLMSSP) { 803 798 if ((pSMB->req.hdr.Flags2 & SMBFLG2_UNICODE) == 0) { 804 - cERROR(1, "NTLMSSP requires Unicode support"); 799 + cifs_dbg(VFS, "NTLMSSP requires Unicode support\n"); 805 800 rc = -ENOSYS; 806 801 goto ssetup_exit; 807 802 } 808 803 809 - cFYI(1, "ntlmssp session setup phase %d", phase); 804 + cifs_dbg(FYI, "ntlmssp session setup phase %d\n", phase); 810 805 pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; 811 806 capabilities |= CAP_EXTENDED_SECURITY; 812 807 pSMB->req.Capabilities |= cpu_to_le32(capabilities); ··· 829 824 5*sizeof(struct _AUTHENTICATE_MESSAGE), 830 825 GFP_KERNEL); 831 826 if (!ntlmsspblob) { 832 - cERROR(1, "Can't allocate NTLMSSP blob"); 833 827 rc = -ENOMEM; 834 828 goto ssetup_exit; 835 829 } ··· 848 844 smb_buf->Uid = ses->Suid; 849 845 break; 850 846 default: 851 - cERROR(1, "invalid phase %d", phase); 847 + cifs_dbg(VFS, "invalid phase %d\n", phase); 852 848 rc = -ENOSYS; 853 849 goto ssetup_exit; 854 850 } ··· 859 855 } 860 856 unicode_oslm_strings(&bcc_ptr, nls_cp); 861 857 } else { 862 - cERROR(1, "secType %d not supported!", type); 858 + cifs_dbg(VFS, "secType %d not supported!\n", type); 863 859 rc = -ENOSYS; 864 860 goto ssetup_exit; 865 861 } ··· 884 880 (smb_buf->Status.CifsError == 885 881 cpu_to_le32(NT_STATUS_MORE_PROCESSING_REQUIRED))) { 886 882 if (phase != NtLmNegotiate) { 887 - cERROR(1, "Unexpected more processing error"); 883 + cifs_dbg(VFS, "Unexpected more processing error\n"); 888 884 goto ssetup_exit; 889 885 } 890 886 /* NTLMSSP Negotiate sent now processing challenge (response) */ ··· 896 892 897 893 if ((smb_buf->WordCount != 3) && (smb_buf->WordCount != 4)) { 898 894 rc = -EIO; 899 - cERROR(1, "bad word count %d", smb_buf->WordCount); 895 + cifs_dbg(VFS, "bad word count %d\n", smb_buf->WordCount); 900 896 goto ssetup_exit; 901 897 } 902 898 action = le16_to_cpu(pSMB->resp.Action); 903 899 if (action & GUEST_LOGIN) 904 - cFYI(1, "Guest login"); /* BB mark SesInfo struct? */ 900 + cifs_dbg(FYI, "Guest login\n"); /* BB mark SesInfo struct? */ 905 901 ses->Suid = smb_buf->Uid; /* UID left in wire format (le) */ 906 - cFYI(1, "UID = %llu ", ses->Suid); 902 + cifs_dbg(FYI, "UID = %llu\n", ses->Suid); 907 903 /* response can have either 3 or 4 word count - Samba sends 3 */ 908 904 /* and lanman response is 3 */ 909 905 bytes_remaining = get_bcc(smb_buf); ··· 912 908 if (smb_buf->WordCount == 4) { 913 909 blob_len = le16_to_cpu(pSMB->resp.SecurityBlobLength); 914 910 if (blob_len > bytes_remaining) { 915 - cERROR(1, "bad security blob length %d", blob_len); 911 + cifs_dbg(VFS, "bad security blob length %d\n", 912 + blob_len); 916 913 rc = -EINVAL; 917 914 goto ssetup_exit; 918 915 } ··· 951 946 kfree(ntlmsspblob); 952 947 ntlmsspblob = NULL; 953 948 if (resp_buf_type == CIFS_SMALL_BUFFER) { 954 - cFYI(1, "ssetup freeing small buf %p", iov[0].iov_base); 949 + cifs_dbg(FYI, "ssetup freeing small buf %p\n", iov[0].iov_base); 955 950 cifs_small_buf_release(iov[0].iov_base); 956 951 } else if (resp_buf_type == CIFS_LARGE_BUFFER) 957 952 cifs_buf_release(iov[0].iov_base);
+27 -23
fs/cifs/smb1ops.c
··· 61 61 */ 62 62 --server->sequence_number; 63 63 rc = smb_send(server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); 64 + if (rc < 0) 65 + server->sequence_number--; 66 + 64 67 mutex_unlock(&server->srv_mutex); 65 68 66 - cFYI(1, "issued NT_CANCEL for mid %u, rc = %d", 67 - in_buf->Mid, rc); 69 + cifs_dbg(FYI, "issued NT_CANCEL for mid %u, rc = %d\n", 70 + in_buf->Mid, rc); 68 71 69 72 return rc; 70 73 } ··· 252 249 /* check for plausible wct, bcc and t2 data and parm sizes */ 253 250 /* check for parm and data offset going beyond end of smb */ 254 251 if (pSMB->WordCount != 10) { /* coalesce_t2 depends on this */ 255 - cFYI(1, "invalid transact2 word count"); 252 + cifs_dbg(FYI, "invalid transact2 word count\n"); 256 253 return -EINVAL; 257 254 } 258 255 ··· 264 261 if (total_data_size == data_in_this_rsp) 265 262 return 0; 266 263 else if (total_data_size < data_in_this_rsp) { 267 - cFYI(1, "total data %d smaller than data in frame %d", 268 - total_data_size, data_in_this_rsp); 264 + cifs_dbg(FYI, "total data %d smaller than data in frame %d\n", 265 + total_data_size, data_in_this_rsp); 269 266 return -EINVAL; 270 267 } 271 268 272 269 remaining = total_data_size - data_in_this_rsp; 273 270 274 - cFYI(1, "missing %d bytes from transact2, check next response", 275 - remaining); 271 + cifs_dbg(FYI, "missing %d bytes from transact2, check next response\n", 272 + remaining); 276 273 if (total_data_size > CIFSMaxBufSize) { 277 - cERROR(1, "TotalDataSize %d is over maximum buffer %d", 278 - total_data_size, CIFSMaxBufSize); 274 + cifs_dbg(VFS, "TotalDataSize %d is over maximum buffer %d\n", 275 + total_data_size, CIFSMaxBufSize); 279 276 return -EINVAL; 280 277 } 281 278 return remaining; ··· 296 293 tgt_total_cnt = get_unaligned_le16(&pSMBt->t2_rsp.TotalDataCount); 297 294 298 295 if (tgt_total_cnt != src_total_cnt) 299 - cFYI(1, "total data count of primary and secondary t2 differ " 300 - "source=%hu target=%hu", src_total_cnt, tgt_total_cnt); 296 + cifs_dbg(FYI, "total data count of primary and secondary t2 differ source=%hu target=%hu\n", 297 + src_total_cnt, tgt_total_cnt); 301 298 302 299 total_in_tgt = get_unaligned_le16(&pSMBt->t2_rsp.DataCount); 303 300 304 301 remaining = tgt_total_cnt - total_in_tgt; 305 302 306 303 if (remaining < 0) { 307 - cFYI(1, "Server sent too much data. tgt_total_cnt=%hu " 308 - "total_in_tgt=%hu", tgt_total_cnt, total_in_tgt); 304 + cifs_dbg(FYI, "Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%hu\n", 305 + tgt_total_cnt, total_in_tgt); 309 306 return -EPROTO; 310 307 } 311 308 312 309 if (remaining == 0) { 313 310 /* nothing to do, ignore */ 314 - cFYI(1, "no more data remains"); 311 + cifs_dbg(FYI, "no more data remains\n"); 315 312 return 0; 316 313 } 317 314 318 315 total_in_src = get_unaligned_le16(&pSMBs->t2_rsp.DataCount); 319 316 if (remaining < total_in_src) 320 - cFYI(1, "transact2 2nd response contains too much data"); 317 + cifs_dbg(FYI, "transact2 2nd response contains too much data\n"); 321 318 322 319 /* find end of first SMB data area */ 323 320 data_area_of_tgt = (char *)&pSMBt->hdr.Protocol + ··· 332 329 total_in_tgt += total_in_src; 333 330 /* is the result too big for the field? */ 334 331 if (total_in_tgt > USHRT_MAX) { 335 - cFYI(1, "coalesced DataCount too large (%u)", total_in_tgt); 332 + cifs_dbg(FYI, "coalesced DataCount too large (%u)\n", 333 + total_in_tgt); 336 334 return -EPROTO; 337 335 } 338 336 put_unaligned_le16(total_in_tgt, &pSMBt->t2_rsp.DataCount); ··· 343 339 byte_count += total_in_src; 344 340 /* is the result too big for the field? */ 345 341 if (byte_count > USHRT_MAX) { 346 - cFYI(1, "coalesced BCC too large (%u)", byte_count); 342 + cifs_dbg(FYI, "coalesced BCC too large (%u)\n", byte_count); 347 343 return -EPROTO; 348 344 } 349 345 put_bcc(byte_count, target_hdr); ··· 352 348 byte_count += total_in_src; 353 349 /* don't allow buffer to overflow */ 354 350 if (byte_count > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { 355 - cFYI(1, "coalesced BCC exceeds buffer size (%u)", byte_count); 351 + cifs_dbg(FYI, "coalesced BCC exceeds buffer size (%u)\n", 352 + byte_count); 356 353 return -ENOBUFS; 357 354 } 358 355 target_hdr->smb_buf_length = cpu_to_be32(byte_count); ··· 363 358 364 359 if (remaining != total_in_src) { 365 360 /* more responses to go */ 366 - cFYI(1, "waiting for more secondary responses"); 361 + cifs_dbg(FYI, "waiting for more secondary responses\n"); 367 362 return 1; 368 363 } 369 364 370 365 /* we are done */ 371 - cFYI(1, "found the last secondary response"); 366 + cifs_dbg(FYI, "found the last secondary response\n"); 372 367 return 0; 373 368 } 374 369 ··· 393 388 } 394 389 if (!server->large_buf) { 395 390 /*FIXME: switch to already allocated largebuf?*/ 396 - cERROR(1, "1st trans2 resp needs bigbuf"); 391 + cifs_dbg(VFS, "1st trans2 resp needs bigbuf\n"); 397 392 } else { 398 393 /* Have first buffer */ 399 394 mid->resp_buf = buf; ··· 781 776 goto out; 782 777 } 783 778 784 - cFYI(1, "calling SetFileInfo since SetPathInfo for times not supported " 785 - "by this server"); 779 + cifs_dbg(FYI, "calling SetFileInfo since SetPathInfo for times not supported by this server\n"); 786 780 rc = CIFSSMBOpen(xid, tcon, full_path, FILE_OPEN, 787 781 SYNCHRONIZE | FILE_WRITE_ATTRIBUTES, CREATE_NOT_DIR, 788 782 &netfid, &oplock, NULL, cifs_sb->local_nls,
+4 -4
fs/cifs/smb2file.c
··· 43 43 if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE) { 44 44 cinode->clientCanCacheAll = true; 45 45 cinode->clientCanCacheRead = true; 46 - cFYI(1, "Exclusive Oplock granted on inode %p", 47 - &cinode->vfs_inode); 46 + cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n", 47 + &cinode->vfs_inode); 48 48 } else if (oplock == SMB2_OPLOCK_LEVEL_II) { 49 49 cinode->clientCanCacheAll = false; 50 50 cinode->clientCanCacheRead = true; 51 - cFYI(1, "Level II Oplock granted on inode %p", 52 - &cinode->vfs_inode); 51 + cifs_dbg(FYI, "Level II Oplock granted on inode %p\n", 52 + &cinode->vfs_inode); 53 53 } else { 54 54 cinode->clientCanCacheAll = false; 55 55 cinode->clientCanCacheRead = false;
+1 -1
fs/cifs/smb2inode.c
··· 92 92 (FILE_BASIC_INFO *)data); 93 93 break; 94 94 default: 95 - cERROR(1, "Invalid command"); 95 + cifs_dbg(VFS, "Invalid command\n"); 96 96 break; 97 97 } 98 98
+1 -1
fs/cifs/smb2maperror.c
··· 2472 2472 2473 2473 /* on error mapping not found - return EIO */ 2474 2474 2475 - cFYI(1, "Mapping SMB2 status code %d to POSIX err %d", 2475 + cifs_dbg(FYI, "Mapping SMB2 status code %d to POSIX err %d\n", 2476 2476 smb2err, rc); 2477 2477 2478 2478 return rc;
+48 -48
fs/cifs/smb2misc.c
··· 45 45 if (hdr->Command == SMB2_OPLOCK_BREAK) 46 46 return 0; 47 47 else 48 - cERROR(1, "Received Request not response"); 48 + cifs_dbg(VFS, "Received Request not response\n"); 49 49 } 50 50 } else { /* bad signature or mid */ 51 51 if (*(__le32 *)hdr->ProtocolId != SMB2_PROTO_NUMBER) 52 - cERROR(1, "Bad protocol string signature header %x", 53 - *(unsigned int *) hdr->ProtocolId); 52 + cifs_dbg(VFS, "Bad protocol string signature header %x\n", 53 + *(unsigned int *) hdr->ProtocolId); 54 54 if (mid != hdr->MessageId) 55 - cERROR(1, "Mids do not match: %llu and %llu", mid, 56 - hdr->MessageId); 55 + cifs_dbg(VFS, "Mids do not match: %llu and %llu\n", 56 + mid, hdr->MessageId); 57 57 } 58 - cERROR(1, "Bad SMB detected. The Mid=%llu", hdr->MessageId); 58 + cifs_dbg(VFS, "Bad SMB detected. The Mid=%llu\n", hdr->MessageId); 59 59 return 1; 60 60 } 61 61 ··· 101 101 int command; 102 102 103 103 /* BB disable following printk later */ 104 - cFYI(1, "%s length: 0x%x, smb_buf_length: 0x%x", __func__, length, len); 104 + cifs_dbg(FYI, "%s length: 0x%x, smb_buf_length: 0x%x\n", 105 + __func__, length, len); 105 106 106 107 /* 107 108 * Add function to do table lookup of StructureSize by command ··· 118 117 */ 119 118 return 0; 120 119 } else { 121 - cERROR(1, "Length less than SMB header size"); 120 + cifs_dbg(VFS, "Length less than SMB header size\n"); 122 121 } 123 122 return 1; 124 123 } 125 124 if (len > CIFSMaxBufSize + MAX_SMB2_HDR_SIZE - 4) { 126 - cERROR(1, "SMB length greater than maximum, mid=%llu", mid); 125 + cifs_dbg(VFS, "SMB length greater than maximum, mid=%llu\n", 126 + mid); 127 127 return 1; 128 128 } 129 129 ··· 132 130 return 1; 133 131 134 132 if (hdr->StructureSize != SMB2_HEADER_STRUCTURE_SIZE) { 135 - cERROR(1, "Illegal structure size %u", 136 - le16_to_cpu(hdr->StructureSize)); 133 + cifs_dbg(VFS, "Illegal structure size %u\n", 134 + le16_to_cpu(hdr->StructureSize)); 137 135 return 1; 138 136 } 139 137 140 138 command = le16_to_cpu(hdr->Command); 141 139 if (command >= NUMBER_OF_SMB2_COMMANDS) { 142 - cERROR(1, "Illegal SMB2 command %d", command); 140 + cifs_dbg(VFS, "Illegal SMB2 command %d\n", command); 143 141 return 1; 144 142 } 145 143 ··· 147 145 if (command != SMB2_OPLOCK_BREAK_HE && (hdr->Status == 0 || 148 146 pdu->StructureSize2 != SMB2_ERROR_STRUCTURE_SIZE2)) { 149 147 /* error packets have 9 byte structure size */ 150 - cERROR(1, "Illegal response size %u for command %d", 151 - le16_to_cpu(pdu->StructureSize2), command); 148 + cifs_dbg(VFS, "Illegal response size %u for command %d\n", 149 + le16_to_cpu(pdu->StructureSize2), command); 152 150 return 1; 153 151 } else if (command == SMB2_OPLOCK_BREAK_HE && (hdr->Status == 0) 154 152 && (le16_to_cpu(pdu->StructureSize2) != 44) 155 153 && (le16_to_cpu(pdu->StructureSize2) != 36)) { 156 154 /* special case for SMB2.1 lease break message */ 157 - cERROR(1, "Illegal response size %d for oplock break", 158 - le16_to_cpu(pdu->StructureSize2)); 155 + cifs_dbg(VFS, "Illegal response size %d for oplock break\n", 156 + le16_to_cpu(pdu->StructureSize2)); 159 157 return 1; 160 158 } 161 159 } 162 160 163 161 if (4 + len != length) { 164 - cERROR(1, "Total length %u RFC1002 length %u mismatch mid %llu", 165 - length, 4 + len, mid); 162 + cifs_dbg(VFS, "Total length %u RFC1002 length %u mismatch mid %llu\n", 163 + length, 4 + len, mid); 166 164 return 1; 167 165 } 168 166 169 167 clc_len = smb2_calc_size(hdr); 170 168 171 169 if (4 + len != clc_len) { 172 - cFYI(1, "Calculated size %u length %u mismatch mid %llu", 173 - clc_len, 4 + len, mid); 170 + cifs_dbg(FYI, "Calculated size %u length %u mismatch mid %llu\n", 171 + clc_len, 4 + len, mid); 174 172 /* Windows 7 server returns 24 bytes more */ 175 173 if (clc_len + 20 == len && command == SMB2_OPLOCK_BREAK_HE) 176 174 return 0; ··· 269 267 case SMB2_CHANGE_NOTIFY: 270 268 default: 271 269 /* BB FIXME for unimplemented cases above */ 272 - cERROR(1, "no length check for command"); 270 + cifs_dbg(VFS, "no length check for command\n"); 273 271 break; 274 272 } 275 273 ··· 278 276 * we have little choice but to ignore the data area in this case. 279 277 */ 280 278 if (*off > 4096) { 281 - cERROR(1, "offset %d too large, data area ignored", *off); 279 + cifs_dbg(VFS, "offset %d too large, data area ignored\n", *off); 282 280 *len = 0; 283 281 *off = 0; 284 282 } else if (*off < 0) { 285 - cERROR(1, "negative offset %d to data invalid ignore data area", 286 - *off); 283 + cifs_dbg(VFS, "negative offset %d to data invalid ignore data area\n", 284 + *off); 287 285 *off = 0; 288 286 *len = 0; 289 287 } else if (*len < 0) { 290 - cERROR(1, "negative data length %d invalid, data area ignored", 291 - *len); 288 + cifs_dbg(VFS, "negative data length %d invalid, data area ignored\n", 289 + *len); 292 290 *len = 0; 293 291 } else if (*len > 128 * 1024) { 294 - cERROR(1, "data area larger than 128K: %d", *len); 292 + cifs_dbg(VFS, "data area larger than 128K: %d\n", *len); 295 293 *len = 0; 296 294 } 297 295 ··· 326 324 goto calc_size_exit; 327 325 328 326 smb2_get_data_area_len(&offset, &data_length, hdr); 329 - cFYI(1, "SMB2 data length %d offset %d", data_length, offset); 327 + cifs_dbg(FYI, "SMB2 data length %d offset %d\n", data_length, offset); 330 328 331 329 if (data_length > 0) { 332 330 /* ··· 337 335 * the size of the RFC1001 hdr. 338 336 */ 339 337 if (offset + 4 + 1 < len) { 340 - cERROR(1, "data area offset %d overlaps SMB2 header %d", 341 - offset + 4 + 1, len); 338 + cifs_dbg(VFS, "data area offset %d overlaps SMB2 header %d\n", 339 + offset + 4 + 1, len); 342 340 data_length = 0; 343 341 } else { 344 342 len = 4 + offset + data_length; 345 343 } 346 344 } 347 345 calc_size_exit: 348 - cFYI(1, "SMB2 len %d", len); 346 + cifs_dbg(FYI, "SMB2 len %d\n", len); 349 347 return len; 350 348 } 351 349 ··· 407 405 408 406 rc = SMB2_lease_break(0, tlink_tcon(lw->tlink), lw->lease_key, 409 407 lw->lease_state); 410 - cFYI(1, "Lease release rc %d", rc); 408 + cifs_dbg(FYI, "Lease release rc %d\n", rc); 411 409 cifs_put_tlink(lw->tlink); 412 410 kfree(lw); 413 411 } ··· 428 426 SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED); 429 427 430 428 lw = kmalloc(sizeof(struct smb2_lease_break_work), GFP_KERNEL); 431 - if (!lw) { 432 - cERROR(1, "Memory allocation failed during lease break check"); 429 + if (!lw) 433 430 return false; 434 - } 435 431 436 432 INIT_WORK(&lw->lease_break, cifs_ses_oplock_break); 437 433 lw->lease_state = rsp->NewLeaseState; 438 434 439 - cFYI(1, "Checking for lease break"); 435 + cifs_dbg(FYI, "Checking for lease break\n"); 440 436 441 437 /* look up tcon based on tid & uid */ 442 438 spin_lock(&cifs_tcp_ses_lock); ··· 455 455 SMB2_LEASE_KEY_SIZE)) 456 456 continue; 457 457 458 - cFYI(1, "found in the open list"); 459 - cFYI(1, "lease key match, lease break 0x%d", 460 - le32_to_cpu(rsp->NewLeaseState)); 458 + cifs_dbg(FYI, "found in the open list\n"); 459 + cifs_dbg(FYI, "lease key match, lease break 0x%d\n", 460 + le32_to_cpu(rsp->NewLeaseState)); 461 461 462 462 smb2_set_oplock_level(cinode, 463 463 smb2_map_lease_to_oplock(rsp->NewLeaseState)); ··· 489 489 &lw->lease_break); 490 490 } 491 491 492 - cFYI(1, "found in the pending open list"); 493 - cFYI(1, "lease key match, lease break 0x%d", 494 - le32_to_cpu(rsp->NewLeaseState)); 492 + cifs_dbg(FYI, "found in the pending open list\n"); 493 + cifs_dbg(FYI, "lease key match, lease break 0x%d\n", 494 + le32_to_cpu(rsp->NewLeaseState)); 495 495 496 496 open->oplock = 497 497 smb2_map_lease_to_oplock(rsp->NewLeaseState); ··· 506 506 } 507 507 spin_unlock(&cifs_tcp_ses_lock); 508 508 kfree(lw); 509 - cFYI(1, "Can not process lease break - no lease matched"); 509 + cifs_dbg(FYI, "Can not process lease break - no lease matched\n"); 510 510 return false; 511 511 } 512 512 ··· 520 520 struct cifsInodeInfo *cinode; 521 521 struct cifsFileInfo *cfile; 522 522 523 - cFYI(1, "Checking for oplock break"); 523 + cifs_dbg(FYI, "Checking for oplock break\n"); 524 524 525 525 if (rsp->hdr.Command != SMB2_OPLOCK_BREAK) 526 526 return false; ··· 533 533 return false; 534 534 } 535 535 536 - cFYI(1, "oplock level 0x%d", rsp->OplockLevel); 536 + cifs_dbg(FYI, "oplock level 0x%d\n", rsp->OplockLevel); 537 537 538 538 /* look up tcon based on tid & uid */ 539 539 spin_lock(&cifs_tcp_ses_lock); ··· 553 553 cfile->fid.volatile_fid) 554 554 continue; 555 555 556 - cFYI(1, "file id match, oplock break"); 556 + cifs_dbg(FYI, "file id match, oplock break\n"); 557 557 cinode = CIFS_I(cfile->dentry->d_inode); 558 558 559 559 if (!cinode->clientCanCacheAll && ··· 573 573 } 574 574 spin_unlock(&cifs_file_list_lock); 575 575 spin_unlock(&cifs_tcp_ses_lock); 576 - cFYI(1, "No matching file for oplock break"); 576 + cifs_dbg(FYI, "No matching file for oplock break\n"); 577 577 return true; 578 578 } 579 579 } 580 580 spin_unlock(&cifs_tcp_ses_lock); 581 - cFYI(1, "Can not process oplock break for non-existent connection"); 581 + cifs_dbg(FYI, "Can not process oplock break for non-existent connection\n"); 582 582 return false; 583 583 }
+8 -8
fs/cifs/smb2ops.c
··· 38 38 case 1: 39 39 server->echoes = false; 40 40 server->oplocks = false; 41 - cERROR(1, "disabling echoes and oplocks"); 41 + cifs_dbg(VFS, "disabling echoes and oplocks\n"); 42 42 break; 43 43 case 2: 44 44 server->echoes = true; 45 45 server->oplocks = false; 46 46 server->echo_credits = 1; 47 - cFYI(1, "disabling oplocks"); 47 + cifs_dbg(FYI, "disabling oplocks\n"); 48 48 break; 49 49 default: 50 50 server->echoes = true; ··· 147 147 #ifdef CONFIG_CIFS_DEBUG2 148 148 struct smb2_hdr *smb = (struct smb2_hdr *)buf; 149 149 150 - cERROR(1, "Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d", 151 - smb->Command, smb->Status, smb->Flags, smb->MessageId, 152 - smb->ProcessId); 153 - cERROR(1, "smb buf %p len %u", smb, smb2_calc_size(smb)); 150 + cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d\n", 151 + smb->Command, smb->Status, smb->Flags, smb->MessageId, 152 + smb->ProcessId); 153 + cifs_dbg(VFS, "smb buf %p len %u\n", smb, smb2_calc_size(smb)); 154 154 #endif 155 155 } 156 156 ··· 436 436 &oplock, NULL); 437 437 kfree(utf16_path); 438 438 if (rc) { 439 - cERROR(1, "open dir failed"); 439 + cifs_dbg(VFS, "open dir failed\n"); 440 440 return rc; 441 441 } 442 442 ··· 448 448 rc = SMB2_query_directory(xid, tcon, persistent_fid, volatile_fid, 0, 449 449 srch_inf); 450 450 if (rc) { 451 - cERROR(1, "query directory failed"); 451 + cifs_dbg(VFS, "query directory failed\n"); 452 452 SMB2_close(xid, tcon, persistent_fid, volatile_fid); 453 453 } 454 454 return rc;
+80 -81
fs/cifs/smb2pdu.c
··· 155 155 if ((smb2_command != SMB2_WRITE) && 156 156 (smb2_command != SMB2_CREATE) && 157 157 (smb2_command != SMB2_TREE_DISCONNECT)) { 158 - cFYI(1, "can not send cmd %d while umounting", 159 - smb2_command); 158 + cifs_dbg(FYI, "can not send cmd %d while umounting\n", 159 + smb2_command); 160 160 return -ENODEV; 161 161 } 162 162 } ··· 200 200 * back on-line 201 201 */ 202 202 if (!tcon->retry) { 203 - cFYI(1, "gave up waiting on reconnect in smb_init"); 203 + cifs_dbg(FYI, "gave up waiting on reconnect in smb_init\n"); 204 204 return -EHOSTDOWN; 205 205 } 206 206 } ··· 227 227 cifs_mark_open_files_invalid(tcon); 228 228 rc = SMB2_tcon(0, tcon->ses, tcon->treeName, tcon, nls_codepage); 229 229 mutex_unlock(&tcon->ses->session_mutex); 230 - cFYI(1, "reconnect tcon rc = %d", rc); 230 + cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); 231 231 if (rc) 232 232 goto out; 233 233 atomic_inc(&tconInfoReconnectCount); ··· 335 335 char *security_blob; 336 336 int flags = CIFS_NEG_OP; 337 337 338 - cFYI(1, "Negotiate protocol"); 338 + cifs_dbg(FYI, "Negotiate protocol\n"); 339 339 340 340 if (ses->server) 341 341 server = ses->server; ··· 354 354 else /* if override flags set only sign/seal OR them with global auth */ 355 355 sec_flags = global_secflags | ses->overrideSecFlg; 356 356 357 - cFYI(1, "sec_flags 0x%x", sec_flags); 357 + cifs_dbg(FYI, "sec_flags 0x%x\n", sec_flags); 358 358 359 359 req->hdr.SessionId = 0; 360 360 ··· 389 389 if (rc != 0) 390 390 goto neg_exit; 391 391 392 - cFYI(1, "mode 0x%x", rsp->SecurityMode); 392 + cifs_dbg(FYI, "mode 0x%x\n", rsp->SecurityMode); 393 393 394 394 /* BB we may eventually want to match the negotiated vs. requested 395 395 dialect, even though we are only requesting one at a time */ 396 396 if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) 397 - cFYI(1, "negotiated smb2.0 dialect"); 397 + cifs_dbg(FYI, "negotiated smb2.0 dialect\n"); 398 398 else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) 399 - cFYI(1, "negotiated smb2.1 dialect"); 399 + cifs_dbg(FYI, "negotiated smb2.1 dialect\n"); 400 400 else if (rsp->DialectRevision == cpu_to_le16(SMB30_PROT_ID)) 401 - cFYI(1, "negotiated smb3.0 dialect"); 401 + cifs_dbg(FYI, "negotiated smb3.0 dialect\n"); 402 402 else { 403 - cERROR(1, "Illegal dialect returned by server %d", 404 - le16_to_cpu(rsp->DialectRevision)); 403 + cifs_dbg(VFS, "Illegal dialect returned by server %d\n", 404 + le16_to_cpu(rsp->DialectRevision)); 405 405 rc = -EIO; 406 406 goto neg_exit; 407 407 } ··· 419 419 security_blob = smb2_get_data_area_len(&blob_offset, &blob_length, 420 420 &rsp->hdr); 421 421 if (blob_length == 0) { 422 - cERROR(1, "missing security blob on negprot"); 422 + cifs_dbg(VFS, "missing security blob on negprot\n"); 423 423 rc = -EIO; 424 424 goto neg_exit; 425 425 } 426 426 427 - cFYI(1, "sec_flags 0x%x", sec_flags); 427 + cifs_dbg(FYI, "sec_flags 0x%x\n", sec_flags); 428 428 if ((sec_flags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { 429 - cFYI(1, "Signing required"); 429 + cifs_dbg(FYI, "Signing required\n"); 430 430 if (!(server->sec_mode & (SMB2_NEGOTIATE_SIGNING_REQUIRED | 431 431 SMB2_NEGOTIATE_SIGNING_ENABLED))) { 432 - cERROR(1, "signing required but server lacks support"); 432 + cifs_dbg(VFS, "signing required but server lacks support\n"); 433 433 rc = -EOPNOTSUPP; 434 434 goto neg_exit; 435 435 } 436 436 server->sec_mode |= SECMODE_SIGN_REQUIRED; 437 437 } else if (sec_flags & CIFSSEC_MAY_SIGN) { 438 - cFYI(1, "Signing optional"); 438 + cifs_dbg(FYI, "Signing optional\n"); 439 439 if (server->sec_mode & SMB2_NEGOTIATE_SIGNING_REQUIRED) { 440 - cFYI(1, "Server requires signing"); 440 + cifs_dbg(FYI, "Server requires signing\n"); 441 441 server->sec_mode |= SECMODE_SIGN_REQUIRED; 442 442 } else { 443 443 server->sec_mode &= 444 444 ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); 445 445 } 446 446 } else { 447 - cFYI(1, "Signing disabled"); 447 + cifs_dbg(FYI, "Signing disabled\n"); 448 448 if (server->sec_mode & SMB2_NEGOTIATE_SIGNING_REQUIRED) { 449 - cERROR(1, "Server requires packet signing to be enabled" 450 - " in /proc/fs/cifs/SecurityFlags."); 449 + cifs_dbg(VFS, "Server requires packet signing to be enabled in /proc/fs/cifs/SecurityFlags\n"); 451 450 rc = -EOPNOTSUPP; 452 451 goto neg_exit; 453 452 } ··· 488 489 char *ntlmssp_blob = NULL; 489 490 bool use_spnego = false; /* else use raw ntlmssp */ 490 491 491 - cFYI(1, "Session Setup"); 492 + cifs_dbg(FYI, "Session Setup\n"); 492 493 493 494 if (ses->server) 494 495 server = ses->server; ··· 521 522 else /* if override flags set only sign/seal OR them with global auth */ 522 523 sec_flags = global_secflags | ses->overrideSecFlg; 523 524 524 - cFYI(1, "sec_flags 0x%x", sec_flags); 525 + cifs_dbg(FYI, "sec_flags 0x%x\n", sec_flags); 525 526 526 527 req->hdr.SessionId = 0; /* First session, not a reauthenticate */ 527 528 req->VcNumber = 0; /* MBZ */ ··· 557 558 sizeof(struct _NEGOTIATE_MESSAGE), 558 559 ntlmssp_blob); */ 559 560 /* BB eventually need to add this */ 560 - cERROR(1, "spnego not supported for SMB2 yet"); 561 + cifs_dbg(VFS, "spnego not supported for SMB2 yet\n"); 561 562 rc = -EOPNOTSUPP; 562 563 kfree(ntlmssp_blob); 563 564 goto ssetup_exit; ··· 571 572 ntlmssp_blob = kzalloc(sizeof(struct _NEGOTIATE_MESSAGE) + 500, 572 573 GFP_KERNEL); 573 574 if (ntlmssp_blob == NULL) { 574 - cERROR(1, "failed to malloc ntlmssp blob"); 575 575 rc = -ENOMEM; 576 576 goto ssetup_exit; 577 577 } 578 578 rc = build_ntlmssp_auth_blob(ntlmssp_blob, &blob_length, ses, 579 579 nls_cp); 580 580 if (rc) { 581 - cFYI(1, "build_ntlmssp_auth_blob failed %d", rc); 581 + cifs_dbg(FYI, "build_ntlmssp_auth_blob failed %d\n", 582 + rc); 582 583 goto ssetup_exit; /* BB double check error handling */ 583 584 } 584 585 if (use_spnego) { ··· 586 587 &security_blob, 587 588 blob_length, 588 589 ntlmssp_blob); */ 589 - cERROR(1, "spnego not supported for SMB2 yet"); 590 + cifs_dbg(VFS, "spnego not supported for SMB2 yet\n"); 590 591 rc = -EOPNOTSUPP; 591 592 kfree(ntlmssp_blob); 592 593 goto ssetup_exit; ··· 594 595 security_blob = ntlmssp_blob; 595 596 } 596 597 } else { 597 - cERROR(1, "illegal ntlmssp phase"); 598 + cifs_dbg(VFS, "illegal ntlmssp phase\n"); 598 599 rc = -EIO; 599 600 goto ssetup_exit; 600 601 } ··· 619 620 if (resp_buftype != CIFS_NO_BUFFER && 620 621 rsp->hdr.Status == STATUS_MORE_PROCESSING_REQUIRED) { 621 622 if (phase != NtLmNegotiate) { 622 - cERROR(1, "Unexpected more processing error"); 623 + cifs_dbg(VFS, "Unexpected more processing error\n"); 623 624 goto ssetup_exit; 624 625 } 625 626 if (offsetof(struct smb2_sess_setup_rsp, Buffer) - 4 != 626 627 le16_to_cpu(rsp->SecurityBufferOffset)) { 627 - cERROR(1, "Invalid security buffer offset %d", 628 - le16_to_cpu(rsp->SecurityBufferOffset)); 628 + cifs_dbg(VFS, "Invalid security buffer offset %d\n", 629 + le16_to_cpu(rsp->SecurityBufferOffset)); 629 630 rc = -EIO; 630 631 goto ssetup_exit; 631 632 } ··· 666 667 int rc = 0; 667 668 struct TCP_Server_Info *server; 668 669 669 - cFYI(1, "disconnect session %p", ses); 670 + cifs_dbg(FYI, "disconnect session %p\n", ses); 670 671 671 672 if (ses && (ses->server)) 672 673 server = ses->server; ··· 710 711 struct TCP_Server_Info *server; 711 712 __le16 *unc_path = NULL; 712 713 713 - cFYI(1, "TCON"); 714 + cifs_dbg(FYI, "TCON\n"); 714 715 715 716 if ((ses->server) && tree) 716 717 server = ses->server; ··· 774 775 } 775 776 776 777 if (rsp->ShareType & SMB2_SHARE_TYPE_DISK) 777 - cFYI(1, "connection to disk share"); 778 + cifs_dbg(FYI, "connection to disk share\n"); 778 779 else if (rsp->ShareType & SMB2_SHARE_TYPE_PIPE) { 779 780 tcon->ipc = true; 780 - cFYI(1, "connection to pipe share"); 781 + cifs_dbg(FYI, "connection to pipe share\n"); 781 782 } else if (rsp->ShareType & SMB2_SHARE_TYPE_PRINT) { 782 783 tcon->print = true; 783 - cFYI(1, "connection to printer"); 784 + cifs_dbg(FYI, "connection to printer\n"); 784 785 } else { 785 - cERROR(1, "unknown share type %d", rsp->ShareType); 786 + cifs_dbg(VFS, "unknown share type %d\n", rsp->ShareType); 786 787 rc = -EOPNOTSUPP; 787 788 goto tcon_error_exit; 788 789 } ··· 796 797 797 798 if ((rsp->Capabilities & SMB2_SHARE_CAP_DFS) && 798 799 ((tcon->share_flags & SHI1005_FLAGS_DFS) == 0)) 799 - cERROR(1, "DFS capability contradicts DFS flag"); 800 + cifs_dbg(VFS, "DFS capability contradicts DFS flag\n"); 800 801 801 802 tcon_exit: 802 803 free_rsp_buf(resp_buftype, rsp); ··· 805 806 806 807 tcon_error_exit: 807 808 if (rsp->hdr.Status == STATUS_BAD_NETWORK_NAME) { 808 - cERROR(1, "BAD_NETWORK_NAME: %s", tree); 809 + cifs_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree); 809 810 tcon->bad_network_name = true; 810 811 } 811 812 goto tcon_exit; ··· 819 820 struct TCP_Server_Info *server; 820 821 struct cifs_ses *ses = tcon->ses; 821 822 822 - cFYI(1, "Tree Disconnect"); 823 + cifs_dbg(FYI, "Tree Disconnect\n"); 823 824 824 825 if (ses && (ses->server)) 825 826 server = ses->server; ··· 845 846 { 846 847 struct create_lease *buf; 847 848 848 - buf = kmalloc(sizeof(struct create_lease), GFP_KERNEL); 849 + buf = kzalloc(sizeof(struct create_lease), GFP_KERNEL); 849 850 if (!buf) 850 851 return NULL; 851 - 852 - memset(buf, 0, sizeof(struct create_lease)); 853 852 854 853 buf->lcontext.LeaseKeyLow = cpu_to_le64(*((u64 *)lease_key)); 855 854 buf->lcontext.LeaseKeyHigh = cpu_to_le64(*((u64 *)(lease_key + 8))); ··· 922 925 int rc = 0; 923 926 int num_iovecs = 2; 924 927 925 - cFYI(1, "create/open"); 928 + cifs_dbg(FYI, "create/open\n"); 926 929 927 930 if (ses && (ses->server)) 928 931 server = ses->server; ··· 1048 1051 int resp_buftype; 1049 1052 int rc = 0; 1050 1053 1051 - cFYI(1, "Close"); 1054 + cifs_dbg(FYI, "Close\n"); 1052 1055 1053 1056 if (ses && (ses->server)) 1054 1057 server = ses->server; ··· 1094 1097 1095 1098 1096 1099 if (buffer_length < min_buf_size) { 1097 - cERROR(1, "buffer length %d smaller than minimum size %d", 1098 - buffer_length, min_buf_size); 1100 + cifs_dbg(VFS, "buffer length %d smaller than minimum size %d\n", 1101 + buffer_length, min_buf_size); 1099 1102 return -EINVAL; 1100 1103 } 1101 1104 1102 1105 /* check if beyond RFC1001 maximum length */ 1103 1106 if ((smb_len > 0x7FFFFF) || (buffer_length > 0x7FFFFF)) { 1104 - cERROR(1, "buffer length %d or smb length %d too large", 1105 - buffer_length, smb_len); 1107 + cifs_dbg(VFS, "buffer length %d or smb length %d too large\n", 1108 + buffer_length, smb_len); 1106 1109 return -EINVAL; 1107 1110 } 1108 1111 1109 1112 if ((begin_of_buf > end_of_smb) || (end_of_buf > end_of_smb)) { 1110 - cERROR(1, "illegal server response, bad offset to data"); 1113 + cifs_dbg(VFS, "illegal server response, bad offset to data\n"); 1111 1114 return -EINVAL; 1112 1115 } 1113 1116 ··· 1152 1155 struct TCP_Server_Info *server; 1153 1156 struct cifs_ses *ses = tcon->ses; 1154 1157 1155 - cFYI(1, "Query Info"); 1158 + cifs_dbg(FYI, "Query Info\n"); 1156 1159 1157 1160 if (ses && (ses->server)) 1158 1161 server = ses->server; ··· 1244 1247 struct smb_rqst rqst = { .rq_iov = &iov, 1245 1248 .rq_nvec = 1 }; 1246 1249 1247 - cFYI(1, "In echo request"); 1250 + cifs_dbg(FYI, "In echo request\n"); 1248 1251 1249 1252 rc = small_smb2_init(SMB2_ECHO, NULL, (void **)&req); 1250 1253 if (rc) ··· 1259 1262 rc = cifs_call_async(server, &rqst, NULL, smb2_echo_callback, server, 1260 1263 CIFS_ECHO_OP); 1261 1264 if (rc) 1262 - cFYI(1, "Echo request failed: %d", rc); 1265 + cifs_dbg(FYI, "Echo request failed: %d\n", rc); 1263 1266 1264 1267 cifs_small_buf_release(req); 1265 1268 return rc; ··· 1276 1279 int resp_buftype; 1277 1280 int rc = 0; 1278 1281 1279 - cFYI(1, "Flush"); 1282 + cifs_dbg(FYI, "Flush\n"); 1280 1283 1281 1284 if (ses && (ses->server)) 1282 1285 server = ses->server; ··· 1376 1379 .rq_pagesz = rdata->pagesz, 1377 1380 .rq_tailsz = rdata->tailsz }; 1378 1381 1379 - cFYI(1, "%s: mid=%llu state=%d result=%d bytes=%u", __func__, 1380 - mid->mid, mid->mid_state, rdata->result, rdata->bytes); 1382 + cifs_dbg(FYI, "%s: mid=%llu state=%d result=%d bytes=%u\n", 1383 + __func__, mid->mid, mid->mid_state, rdata->result, 1384 + rdata->bytes); 1381 1385 1382 1386 switch (mid->mid_state) { 1383 1387 case MID_RESPONSE_RECEIVED: ··· 1390 1392 1391 1393 rc = smb2_verify_signature(&rqst, server); 1392 1394 if (rc) 1393 - cERROR(1, "SMB signature verification returned " 1394 - "error = %d", rc); 1395 + cifs_dbg(VFS, "SMB signature verification returned error = %d\n", 1396 + rc); 1395 1397 } 1396 1398 /* FIXME: should this be counted toward the initiating task? */ 1397 1399 task_io_account_read(rdata->bytes); ··· 1424 1426 struct smb_rqst rqst = { .rq_iov = &rdata->iov, 1425 1427 .rq_nvec = 1 }; 1426 1428 1427 - cFYI(1, "%s: offset=%llu bytes=%u", __func__, 1428 - rdata->offset, rdata->bytes); 1429 + cifs_dbg(FYI, "%s: offset=%llu bytes=%u\n", 1430 + __func__, rdata->offset, rdata->bytes); 1429 1431 1430 1432 io_parms.tcon = tlink_tcon(rdata->cfile->tlink); 1431 1433 io_parms.offset = rdata->offset; ··· 1479 1481 1480 1482 if (rc) { 1481 1483 cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE); 1482 - cERROR(1, "Send error in read = %d", rc); 1484 + cifs_dbg(VFS, "Send error in read = %d\n", rc); 1483 1485 } else { 1484 1486 *nbytes = le32_to_cpu(rsp->DataLength); 1485 1487 if ((*nbytes > CIFS_MAX_MSGSIZE) || 1486 1488 (*nbytes > io_parms->length)) { 1487 - cFYI(1, "bad length %d for count %d", *nbytes, 1488 - io_parms->length); 1489 + cifs_dbg(FYI, "bad length %d for count %d\n", 1490 + *nbytes, io_parms->length); 1489 1491 rc = -EIO; 1490 1492 *nbytes = 0; 1491 1493 } ··· 1595 1597 rqst.rq_pagesz = wdata->pagesz; 1596 1598 rqst.rq_tailsz = wdata->tailsz; 1597 1599 1598 - cFYI(1, "async write at %llu %u bytes", wdata->offset, wdata->bytes); 1600 + cifs_dbg(FYI, "async write at %llu %u bytes\n", 1601 + wdata->offset, wdata->bytes); 1599 1602 1600 1603 req->Length = cpu_to_le32(wdata->bytes); 1601 1604 ··· 1669 1670 1670 1671 if (rc) { 1671 1672 cifs_stats_fail_inc(io_parms->tcon, SMB2_WRITE_HE); 1672 - cERROR(1, "Send error in write = %d", rc); 1673 + cifs_dbg(VFS, "Send error in write = %d\n", rc); 1673 1674 } else 1674 1675 *nbytes = le32_to_cpu(rsp->DataLength); 1675 1676 ··· 1695 1696 ((char *)entryptr + next_offset); 1696 1697 1697 1698 if ((char *)entryptr + size > end_of_buf) { 1698 - cERROR(1, "malformed search entry would overflow"); 1699 + cifs_dbg(VFS, "malformed search entry would overflow\n"); 1699 1700 break; 1700 1701 } 1701 1702 1702 1703 len = le32_to_cpu(entryptr->FileNameLength); 1703 1704 if ((char *)entryptr + len + size > end_of_buf) { 1704 - cERROR(1, "directory entry name would overflow frame " 1705 - "end of buf %p", end_of_buf); 1705 + cifs_dbg(VFS, "directory entry name would overflow frame end of buf %p\n", 1706 + end_of_buf); 1706 1707 break; 1707 1708 } 1708 1709 ··· 1758 1759 info_buf_size = sizeof(SEARCH_ID_FULL_DIR_INFO) - 1; 1759 1760 break; 1760 1761 default: 1761 - cERROR(1, "info level %u isn't supported", 1762 - srch_inf->info_level); 1762 + cifs_dbg(VFS, "info level %u isn't supported\n", 1763 + srch_inf->info_level); 1763 1764 rc = -EINVAL; 1764 1765 goto qdir_exit; 1765 1766 } ··· 1823 1824 num_entries(srch_inf->srch_entries_start, end_of_smb, 1824 1825 &srch_inf->last_entry, info_buf_size); 1825 1826 srch_inf->index_of_last_entry += srch_inf->entries_in_buffer; 1826 - cFYI(1, "num entries %d last_index %lld srch start %p srch end %p", 1827 - srch_inf->entries_in_buffer, srch_inf->index_of_last_entry, 1828 - srch_inf->srch_entries_start, srch_inf->last_entry); 1827 + cifs_dbg(FYI, "num entries %d last_index %lld srch start %p srch end %p\n", 1828 + srch_inf->entries_in_buffer, srch_inf->index_of_last_entry, 1829 + srch_inf->srch_entries_start, srch_inf->last_entry); 1829 1830 if (resp_buftype == CIFS_LARGE_BUFFER) 1830 1831 srch_inf->smallBuf = false; 1831 1832 else if (resp_buftype == CIFS_SMALL_BUFFER) 1832 1833 srch_inf->smallBuf = true; 1833 1834 else 1834 - cERROR(1, "illegal search buffer type"); 1835 + cifs_dbg(VFS, "illegal search buffer type\n"); 1835 1836 1836 1837 if (rsp->hdr.Status == STATUS_NO_MORE_FILES) 1837 1838 srch_inf->endOfSearch = 1; ··· 2016 2017 int rc; 2017 2018 struct smb2_oplock_break *req = NULL; 2018 2019 2019 - cFYI(1, "SMB2_oplock_break"); 2020 + cifs_dbg(FYI, "SMB2_oplock_break\n"); 2020 2021 rc = small_smb2_init(SMB2_OPLOCK_BREAK, tcon, (void **) &req); 2021 2022 2022 2023 if (rc) ··· 2032 2033 2033 2034 if (rc) { 2034 2035 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); 2035 - cFYI(1, "Send error in Oplock Break = %d", rc); 2036 + cifs_dbg(FYI, "Send error in Oplock Break = %d\n", rc); 2036 2037 } 2037 2038 2038 2039 return rc; ··· 2057 2058 int rc; 2058 2059 struct smb2_query_info_req *req; 2059 2060 2060 - cFYI(1, "Query FSInfo level %d", level); 2061 + cifs_dbg(FYI, "Query FSInfo level %d\n", level); 2061 2062 2062 2063 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) 2063 2064 return -EIO; ··· 2130 2131 int resp_buf_type; 2131 2132 unsigned int count; 2132 2133 2133 - cFYI(1, "smb2_lockv num lock %d", num_lock); 2134 + cifs_dbg(FYI, "smb2_lockv num lock %d\n", num_lock); 2134 2135 2135 2136 rc = small_smb2_init(SMB2_LOCK, tcon, (void **) &req); 2136 2137 if (rc) ··· 2154 2155 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); 2155 2156 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, CIFS_NO_RESP); 2156 2157 if (rc) { 2157 - cFYI(1, "Send error in smb2_lockv = %d", rc); 2158 + cifs_dbg(FYI, "Send error in smb2_lockv = %d\n", rc); 2158 2159 cifs_stats_fail_inc(tcon, SMB2_LOCK_HE); 2159 2160 } 2160 2161 ··· 2185 2186 int rc; 2186 2187 struct smb2_lease_ack *req = NULL; 2187 2188 2188 - cFYI(1, "SMB2_lease_break"); 2189 + cifs_dbg(FYI, "SMB2_lease_break\n"); 2189 2190 rc = small_smb2_init(SMB2_OPLOCK_BREAK, tcon, (void **) &req); 2190 2191 2191 2192 if (rc) ··· 2203 2204 2204 2205 if (rc) { 2205 2206 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); 2206 - cFYI(1, "Send error in Lease Break = %d", rc); 2207 + cifs_dbg(FYI, "Send error in Lease Break = %d\n", rc); 2207 2208 } 2208 2209 2209 2210 return rc;
+13 -13
fs/cifs/smb2transport.c
··· 55 55 rc = crypto_shash_setkey(server->secmech.hmacsha256, 56 56 server->session_key.response, SMB2_NTLMV2_SESSKEY_SIZE); 57 57 if (rc) { 58 - cERROR(1, "%s: Could not update with response\n", __func__); 58 + cifs_dbg(VFS, "%s: Could not update with response\n", __func__); 59 59 return rc; 60 60 } 61 61 62 62 rc = crypto_shash_init(&server->secmech.sdeschmacsha256->shash); 63 63 if (rc) { 64 - cERROR(1, "%s: Could not init md5\n", __func__); 64 + cifs_dbg(VFS, "%s: Could not init md5\n", __func__); 65 65 return rc; 66 66 } 67 67 ··· 69 69 if (iov[i].iov_len == 0) 70 70 continue; 71 71 if (iov[i].iov_base == NULL) { 72 - cERROR(1, "null iovec entry"); 72 + cifs_dbg(VFS, "null iovec entry\n"); 73 73 return -EIO; 74 74 } 75 75 /* ··· 90 90 iov[i].iov_base, iov[i].iov_len); 91 91 } 92 92 if (rc) { 93 - cERROR(1, "%s: Could not update with payload\n", 94 - __func__); 93 + cifs_dbg(VFS, "%s: Could not update with payload\n", 94 + __func__); 95 95 return rc; 96 96 } 97 97 } ··· 109 109 rc = crypto_shash_final(&server->secmech.sdeschmacsha256->shash, 110 110 sigptr); 111 111 if (rc) 112 - cERROR(1, "%s: Could not generate sha256 hash\n", __func__); 112 + cifs_dbg(VFS, "%s: Could not generate sha256 hash\n", __func__); 113 113 114 114 memcpy(smb2_pdu->Signature, sigptr, SMB2_SIGNATURE_SIZE); 115 115 ··· 119 119 int 120 120 smb3_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server) 121 121 { 122 - cFYI(1, "smb3 signatures not supported yet"); 122 + cifs_dbg(FYI, "smb3 signatures not supported yet\n"); 123 123 return -EOPNOTSUPP; 124 124 } 125 125 ··· 163 163 164 164 /* Do not need to verify session setups with signature "BSRSPYL " */ 165 165 if (memcmp(smb2_pdu->Signature, "BSRSPYL ", 8) == 0) 166 - cFYI(1, "dummy signature received for smb command 0x%x", 167 - smb2_pdu->Command); 166 + cifs_dbg(FYI, "dummy signature received for smb command 0x%x\n", 167 + smb2_pdu->Command); 168 168 169 169 /* 170 170 * Save off the origiginal signature so we can modify the smb and check ··· 205 205 struct mid_q_entry *temp; 206 206 207 207 if (server == NULL) { 208 - cERROR(1, "Null TCP session in smb2_mid_entry_alloc"); 208 + cifs_dbg(VFS, "Null TCP session in smb2_mid_entry_alloc\n"); 209 209 return NULL; 210 210 } 211 211 ··· 241 241 return -ENOENT; 242 242 243 243 if (ses->server->tcpStatus == CifsNeedReconnect) { 244 - cFYI(1, "tcp session dead - return to caller to retry"); 244 + cifs_dbg(FYI, "tcp session dead - return to caller to retry\n"); 245 245 return -EAGAIN; 246 246 } 247 247 ··· 281 281 282 282 rc = smb2_verify_signature(&rqst, server); 283 283 if (rc) 284 - cERROR(1, "SMB signature verification returned error = " 285 - "%d", rc); 284 + cifs_dbg(VFS, "SMB signature verification returned error = %d\n", 285 + rc); 286 286 } 287 287 288 288 return map_smb2_to_linux_error(mid->resp_buf, log_error);
+9 -8
fs/cifs/smbencrypt.c
··· 78 78 tfm_des = crypto_alloc_blkcipher("ecb(des)", 0, CRYPTO_ALG_ASYNC); 79 79 if (IS_ERR(tfm_des)) { 80 80 rc = PTR_ERR(tfm_des); 81 - cERROR(1, "could not allocate des crypto API"); 81 + cifs_dbg(VFS, "could not allocate des crypto API\n"); 82 82 goto smbhash_err; 83 83 } 84 84 ··· 91 91 92 92 rc = crypto_blkcipher_encrypt(&desc, &sgout, &sgin, 8); 93 93 if (rc) 94 - cERROR(1, "could not encrypt crypt key rc: %d", rc); 94 + cifs_dbg(VFS, "could not encrypt crypt key rc: %d\n", rc); 95 95 96 96 crypto_free_blkcipher(tfm_des); 97 97 smbhash_err: ··· 139 139 md4 = crypto_alloc_shash("md4", 0, 0); 140 140 if (IS_ERR(md4)) { 141 141 rc = PTR_ERR(md4); 142 - cERROR(1, "%s: Crypto md4 allocation error %d", __func__, rc); 142 + cifs_dbg(VFS, "%s: Crypto md4 allocation error %d\n", 143 + __func__, rc); 143 144 return rc; 144 145 } 145 146 size = sizeof(struct shash_desc) + crypto_shash_descsize(md4); 146 147 sdescmd4 = kmalloc(size, GFP_KERNEL); 147 148 if (!sdescmd4) { 148 149 rc = -ENOMEM; 149 - cERROR(1, "%s: Memory allocation failure", __func__); 150 150 goto mdfour_err; 151 151 } 152 152 sdescmd4->shash.tfm = md4; ··· 154 154 155 155 rc = crypto_shash_init(&sdescmd4->shash); 156 156 if (rc) { 157 - cERROR(1, "%s: Could not init md4 shash", __func__); 157 + cifs_dbg(VFS, "%s: Could not init md4 shash\n", __func__); 158 158 goto mdfour_err; 159 159 } 160 160 rc = crypto_shash_update(&sdescmd4->shash, link_str, link_len); 161 161 if (rc) { 162 - cERROR(1, "%s: Could not update with link_str", __func__); 162 + cifs_dbg(VFS, "%s: Could not update with link_str\n", __func__); 163 163 goto mdfour_err; 164 164 } 165 165 rc = crypto_shash_final(&sdescmd4->shash, md4_hash); 166 166 if (rc) 167 - cERROR(1, "%s: Could not genereate md4 hash", __func__); 167 + cifs_dbg(VFS, "%s: Could not generate md4 hash\n", __func__); 168 168 169 169 mdfour_err: 170 170 crypto_free_shash(md4); ··· 238 238 239 239 rc = E_md4hash(passwd, p16, codepage); 240 240 if (rc) { 241 - cFYI(1, "%s Can't generate NT hash, error: %d", __func__, rc); 241 + cifs_dbg(FYI, "%s Can't generate NT hash, error: %d\n", 242 + __func__, rc); 242 243 return rc; 243 244 } 244 245 memcpy(p21, p16, 16);
+46 -38
fs/cifs/transport.c
··· 49 49 struct mid_q_entry *temp; 50 50 51 51 if (server == NULL) { 52 - cERROR(1, "Null TCP session in AllocMidQEntry"); 52 + cifs_dbg(VFS, "Null TCP session in AllocMidQEntry\n"); 53 53 return NULL; 54 54 } 55 55 ··· 61 61 temp->mid = smb_buffer->Mid; /* always LE */ 62 62 temp->pid = current->pid; 63 63 temp->command = cpu_to_le16(smb_buffer->Command); 64 - cFYI(1, "For smb_command %d", smb_buffer->Command); 64 + cifs_dbg(FYI, "For smb_command %d\n", smb_buffer->Command); 65 65 /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */ 66 66 /* when mid allocated can be before when sent */ 67 67 temp->when_alloc = jiffies; ··· 179 179 */ 180 180 rc = kernel_sendmsg(ssocket, &smb_msg, &iov[first_vec], 181 181 n_vec - first_vec, remaining); 182 - if (rc == -ENOSPC || rc == -EAGAIN) { 183 - /* 184 - * Catch if a low level driver returns -ENOSPC. This 185 - * WARN_ON will be removed by 3.10 if no one reports 186 - * seeing this. 187 - */ 188 - WARN_ON_ONCE(rc == -ENOSPC); 182 + if (rc == -EAGAIN) { 189 183 i++; 190 184 if (i >= 14 || (!server->noblocksnd && (i > 2))) { 191 - cERROR(1, "sends on sock %p stuck for 15 " 192 - "seconds", ssocket); 185 + cifs_dbg(VFS, "sends on sock %p stuck for 15 seconds\n", 186 + ssocket); 193 187 rc = -EAGAIN; 194 188 break; 195 189 } ··· 203 209 } 204 210 205 211 if (rc > remaining) { 206 - cERROR(1, "sent %d requested %d", rc, remaining); 212 + cifs_dbg(VFS, "sent %d requested %d\n", rc, remaining); 207 213 break; 208 214 } 209 215 210 216 if (rc == 0) { 211 217 /* should never happen, letting socket clear before 212 218 retrying is our only obvious option here */ 213 - cERROR(1, "tcp sent no data"); 219 + cifs_dbg(VFS, "tcp sent no data\n"); 214 220 msleep(500); 215 221 continue; 216 222 } ··· 285 291 if (ssocket == NULL) 286 292 return -ENOTSOCK; 287 293 288 - cFYI(1, "Sending smb: smb_len=%u", smb_buf_length); 294 + cifs_dbg(FYI, "Sending smb: smb_len=%u\n", smb_buf_length); 289 295 dump_smb(iov[0].iov_base, iov[0].iov_len); 290 296 291 297 /* cork the socket */ ··· 318 324 (char *)&val, sizeof(val)); 319 325 320 326 if ((total_len > 0) && (total_len != smb_buf_length + 4)) { 321 - cFYI(1, "partial send (wanted=%u sent=%zu): terminating " 322 - "session", smb_buf_length + 4, total_len); 327 + cifs_dbg(FYI, "partial send (wanted=%u sent=%zu): terminating session\n", 328 + smb_buf_length + 4, total_len); 323 329 /* 324 330 * If we have only sent part of an SMB then the next SMB could 325 331 * be taken as the remainder of this one. We need to kill the ··· 329 335 } 330 336 331 337 if (rc < 0 && rc != -EINTR) 332 - cERROR(1, "Error %d sending data on socket to server", rc); 338 + cifs_dbg(VFS, "Error %d sending data on socket to server\n", 339 + rc); 333 340 else 334 341 rc = 0; 335 342 ··· 422 427 } 423 428 424 429 if (ses->server->tcpStatus == CifsNeedReconnect) { 425 - cFYI(1, "tcp session dead - return to caller to retry"); 430 + cifs_dbg(FYI, "tcp session dead - return to caller to retry\n"); 426 431 return -EAGAIN; 427 432 } 428 433 ··· 522 527 rc = smb_send_rqst(server, rqst); 523 528 cifs_in_send_dec(server); 524 529 cifs_save_when_sent(mid); 530 + 531 + if (rc < 0) 532 + server->sequence_number -= 2; 525 533 mutex_unlock(&server->srv_mutex); 526 534 527 535 if (rc == 0) ··· 557 559 iov[0].iov_len = get_rfc1002_length(in_buf) + 4; 558 560 flags |= CIFS_NO_RESP; 559 561 rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags); 560 - cFYI(DBG2, "SendRcvNoRsp flags %d rc %d", flags, rc); 562 + cifs_dbg(NOISY, "SendRcvNoRsp flags %d rc %d\n", flags, rc); 561 563 562 564 return rc; 563 565 } ··· 567 569 { 568 570 int rc = 0; 569 571 570 - cFYI(1, "%s: cmd=%d mid=%llu state=%d", __func__, 571 - le16_to_cpu(mid->command), mid->mid, mid->mid_state); 572 + cifs_dbg(FYI, "%s: cmd=%d mid=%llu state=%d\n", 573 + __func__, le16_to_cpu(mid->command), mid->mid, mid->mid_state); 572 574 573 575 spin_lock(&GlobalMid_Lock); 574 576 switch (mid->mid_state) { ··· 586 588 break; 587 589 default: 588 590 list_del_init(&mid->qhead); 589 - cERROR(1, "%s: invalid mid state mid=%llu state=%d", __func__, 590 - mid->mid, mid->mid_state); 591 + cifs_dbg(VFS, "%s: invalid mid state mid=%llu state=%d\n", 592 + __func__, mid->mid, mid->mid_state); 591 593 rc = -EIO; 592 594 } 593 595 spin_unlock(&GlobalMid_Lock); ··· 622 624 iov.iov_len = len; 623 625 /* FIXME: add code to kill session */ 624 626 rc = cifs_verify_signature(&rqst, server, 625 - mid->sequence_number + 1); 627 + mid->sequence_number); 626 628 if (rc) 627 - cERROR(1, "SMB signature verification returned error = " 628 - "%d", rc); 629 + cifs_dbg(VFS, "SMB signature verification returned error = %d\n", 630 + rc); 629 631 } 630 632 631 633 /* BB special case reconnect tid and uid here? */ ··· 670 672 671 673 if ((ses == NULL) || (ses->server == NULL)) { 672 674 cifs_small_buf_release(buf); 673 - cERROR(1, "Null session"); 675 + cifs_dbg(VFS, "Null session\n"); 674 676 return -EIO; 675 677 } 676 678 ··· 714 716 cifs_in_send_dec(ses->server); 715 717 cifs_save_when_sent(midQ); 716 718 719 + if (rc < 0) 720 + ses->server->sequence_number -= 2; 717 721 mutex_unlock(&ses->server->srv_mutex); 718 722 719 723 if (rc < 0) { ··· 752 752 753 753 if (!midQ->resp_buf || midQ->mid_state != MID_RESPONSE_RECEIVED) { 754 754 rc = -EIO; 755 - cFYI(1, "Bad MID state?"); 755 + cifs_dbg(FYI, "Bad MID state?\n"); 756 756 goto out; 757 757 } 758 758 ··· 788 788 struct mid_q_entry *midQ; 789 789 790 790 if (ses == NULL) { 791 - cERROR(1, "Null smb session"); 791 + cifs_dbg(VFS, "Null smb session\n"); 792 792 return -EIO; 793 793 } 794 794 if (ses->server == NULL) { 795 - cERROR(1, "Null tcp session"); 795 + cifs_dbg(VFS, "Null tcp session\n"); 796 796 return -EIO; 797 797 } 798 798 ··· 805 805 806 806 if (be32_to_cpu(in_buf->smb_buf_length) > CIFSMaxBufSize + 807 807 MAX_CIFS_HDR_SIZE - 4) { 808 - cERROR(1, "Illegal length, greater than maximum frame, %d", 809 - be32_to_cpu(in_buf->smb_buf_length)); 808 + cifs_dbg(VFS, "Illegal length, greater than maximum frame, %d\n", 809 + be32_to_cpu(in_buf->smb_buf_length)); 810 810 return -EIO; 811 811 } 812 812 ··· 840 840 rc = smb_send(ses->server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); 841 841 cifs_in_send_dec(ses->server); 842 842 cifs_save_when_sent(midQ); 843 + 844 + if (rc < 0) 845 + ses->server->sequence_number -= 2; 846 + 843 847 mutex_unlock(&ses->server->srv_mutex); 844 848 845 849 if (rc < 0) ··· 875 871 if (!midQ->resp_buf || !out_buf || 876 872 midQ->mid_state != MID_RESPONSE_RECEIVED) { 877 873 rc = -EIO; 878 - cERROR(1, "Bad MID state?"); 874 + cifs_dbg(VFS, "Bad MID state?\n"); 879 875 goto out; 880 876 } 881 877 ··· 925 921 struct cifs_ses *ses; 926 922 927 923 if (tcon == NULL || tcon->ses == NULL) { 928 - cERROR(1, "Null smb session"); 924 + cifs_dbg(VFS, "Null smb session\n"); 929 925 return -EIO; 930 926 } 931 927 ses = tcon->ses; 932 928 933 929 if (ses->server == NULL) { 934 - cERROR(1, "Null tcp session"); 930 + cifs_dbg(VFS, "Null tcp session\n"); 935 931 return -EIO; 936 932 } 937 933 ··· 944 940 945 941 if (be32_to_cpu(in_buf->smb_buf_length) > CIFSMaxBufSize + 946 942 MAX_CIFS_HDR_SIZE - 4) { 947 - cERROR(1, "Illegal length, greater than maximum frame, %d", 948 - be32_to_cpu(in_buf->smb_buf_length)); 943 + cifs_dbg(VFS, "Illegal length, greater than maximum frame, %d\n", 944 + be32_to_cpu(in_buf->smb_buf_length)); 949 945 return -EIO; 950 946 } 951 947 ··· 977 973 rc = smb_send(ses->server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); 978 974 cifs_in_send_dec(ses->server); 979 975 cifs_save_when_sent(midQ); 976 + 977 + if (rc < 0) 978 + ses->server->sequence_number -= 2; 979 + 980 980 mutex_unlock(&ses->server->srv_mutex); 981 981 982 982 if (rc < 0) { ··· 1046 1038 /* rcvd frame is ok */ 1047 1039 if (out_buf == NULL || midQ->mid_state != MID_RESPONSE_RECEIVED) { 1048 1040 rc = -EIO; 1049 - cERROR(1, "Bad MID state?"); 1041 + cifs_dbg(VFS, "Bad MID state?\n"); 1050 1042 goto out; 1051 1043 } 1052 1044
+26 -28
fs/cifs/xattr.c
··· 68 68 goto remove_ea_exit; 69 69 } 70 70 if (ea_name == NULL) { 71 - cFYI(1, "Null xattr names not supported"); 71 + cifs_dbg(FYI, "Null xattr names not supported\n"); 72 72 } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) 73 73 && (strncmp(ea_name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN))) { 74 - cFYI(1, 75 - "illegal xattr request %s (only user namespace supported)", 76 - ea_name); 74 + cifs_dbg(FYI, 75 + "illegal xattr request %s (only user namespace supported)\n", 76 + ea_name); 77 77 /* BB what if no namespace prefix? */ 78 78 /* Should we just pass them to server, except for 79 79 system and perhaps security prefixes? */ ··· 134 134 search server for EAs or streams to 135 135 returns as xattrs */ 136 136 if (value_size > MAX_EA_VALUE_SIZE) { 137 - cFYI(1, "size of EA value too large"); 137 + cifs_dbg(FYI, "size of EA value too large\n"); 138 138 rc = -EOPNOTSUPP; 139 139 goto set_ea_exit; 140 140 } 141 141 142 142 if (ea_name == NULL) { 143 - cFYI(1, "Null xattr names not supported"); 143 + cifs_dbg(FYI, "Null xattr names not supported\n"); 144 144 } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) 145 145 == 0) { 146 146 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) 147 147 goto set_ea_exit; 148 148 if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) 149 - cFYI(1, "attempt to set cifs inode metadata"); 149 + cifs_dbg(FYI, "attempt to set cifs inode metadata\n"); 150 150 151 151 ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */ 152 152 rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, ··· 167 167 struct cifs_ntsd *pacl; 168 168 pacl = kmalloc(value_size, GFP_KERNEL); 169 169 if (!pacl) { 170 - cFYI(1, "%s: Can't allocate memory for ACL", 171 - __func__); 172 170 rc = -ENOMEM; 173 171 } else { 174 172 memcpy(pacl, ea_value, value_size); ··· 177 179 kfree(pacl); 178 180 } 179 181 #else 180 - cFYI(1, "Set CIFS ACL not supported yet"); 182 + cifs_dbg(FYI, "Set CIFS ACL not supported yet\n"); 181 183 #endif /* CONFIG_CIFS_ACL */ 182 184 } else { 183 185 int temp; ··· 191 193 ACL_TYPE_ACCESS, cifs_sb->local_nls, 192 194 cifs_sb->mnt_cifs_flags & 193 195 CIFS_MOUNT_MAP_SPECIAL_CHR); 194 - cFYI(1, "set POSIX ACL rc %d", rc); 196 + cifs_dbg(FYI, "set POSIX ACL rc %d\n", rc); 195 197 #else 196 - cFYI(1, "set POSIX ACL not supported"); 198 + cifs_dbg(FYI, "set POSIX ACL not supported\n"); 197 199 #endif 198 200 } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, 199 201 strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { ··· 204 206 ACL_TYPE_DEFAULT, cifs_sb->local_nls, 205 207 cifs_sb->mnt_cifs_flags & 206 208 CIFS_MOUNT_MAP_SPECIAL_CHR); 207 - cFYI(1, "set POSIX default ACL rc %d", rc); 209 + cifs_dbg(FYI, "set POSIX default ACL rc %d\n", rc); 208 210 #else 209 - cFYI(1, "set default POSIX ACL not supported"); 211 + cifs_dbg(FYI, "set default POSIX ACL not supported\n"); 210 212 #endif 211 213 } else { 212 - cFYI(1, "illegal xattr request %s (only user namespace" 213 - " supported)", ea_name); 214 + cifs_dbg(FYI, "illegal xattr request %s (only user namespace supported)\n", 215 + ea_name); 214 216 /* BB what if no namespace prefix? */ 215 217 /* Should we just pass them to server, except for 216 218 system and perhaps security prefixes? */ ··· 261 263 /* return dos attributes as pseudo xattr */ 262 264 /* return alt name if available as pseudo attr */ 263 265 if (ea_name == NULL) { 264 - cFYI(1, "Null xattr names not supported"); 266 + cifs_dbg(FYI, "Null xattr names not supported\n"); 265 267 } else if (strncmp(ea_name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) 266 268 == 0) { 267 269 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) 268 270 goto get_ea_exit; 269 271 270 272 if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) { 271 - cFYI(1, "attempt to query cifs inode metadata"); 273 + cifs_dbg(FYI, "attempt to query cifs inode metadata\n"); 272 274 /* revalidate/getattr then populate from inode */ 273 275 } /* BB add else when above is implemented */ 274 276 ea_name += XATTR_USER_PREFIX_LEN; /* skip past user. prefix */ ··· 293 295 cifs_sb->mnt_cifs_flags & 294 296 CIFS_MOUNT_MAP_SPECIAL_CHR); 295 297 #else 296 - cFYI(1, "Query POSIX ACL not supported yet"); 298 + cifs_dbg(FYI, "Query POSIX ACL not supported yet\n"); 297 299 #endif /* CONFIG_CIFS_POSIX */ 298 300 } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, 299 301 strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { ··· 305 307 cifs_sb->mnt_cifs_flags & 306 308 CIFS_MOUNT_MAP_SPECIAL_CHR); 307 309 #else 308 - cFYI(1, "Query POSIX default ACL not supported yet"); 310 + cifs_dbg(FYI, "Query POSIX default ACL not supported yet\n"); 309 311 #endif /* CONFIG_CIFS_POSIX */ 310 312 } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL, 311 313 strlen(CIFS_XATTR_CIFS_ACL)) == 0) { ··· 317 319 full_path, &acllen); 318 320 if (IS_ERR(pacl)) { 319 321 rc = PTR_ERR(pacl); 320 - cERROR(1, "%s: error %zd getting sec desc", 321 - __func__, rc); 322 + cifs_dbg(VFS, "%s: error %zd getting sec desc\n", 323 + __func__, rc); 322 324 } else { 323 325 if (ea_value) { 324 326 if (acllen > buf_size) ··· 330 332 kfree(pacl); 331 333 } 332 334 #else 333 - cFYI(1, "Query CIFS ACL not supported yet"); 335 + cifs_dbg(FYI, "Query CIFS ACL not supported yet\n"); 334 336 #endif /* CONFIG_CIFS_ACL */ 335 337 } else if (strncmp(ea_name, 336 338 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) { 337 - cFYI(1, "Trusted xattr namespace not supported yet"); 339 + cifs_dbg(FYI, "Trusted xattr namespace not supported yet\n"); 338 340 } else if (strncmp(ea_name, 339 341 XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) { 340 - cFYI(1, "Security xattr namespace not supported yet"); 342 + cifs_dbg(FYI, "Security xattr namespace not supported yet\n"); 341 343 } else 342 - cFYI(1, 343 - "illegal xattr request %s (only user namespace supported)", 344 - ea_name); 344 + cifs_dbg(FYI, 345 + "illegal xattr request %s (only user namespace supported)\n", 346 + ea_name); 345 347 346 348 /* We could add an additional check for streams ie 347 349 if proc/fs/cifs/streamstoxattr is set then