diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/asn1.c | 73 | ||||
-rw-r--r-- | fs/cifs/cifs_debug.c | 34 | ||||
-rw-r--r-- | fs/cifs/cifs_debug.h | 42 | ||||
-rw-r--r-- | fs/cifs/cifs_dfs_ref.c | 34 | ||||
-rw-r--r-- | fs/cifs/cifs_spnego.c | 2 | ||||
-rw-r--r-- | fs/cifs/cifs_unicode.c | 5 | ||||
-rw-r--r-- | fs/cifs/cifsacl.c | 76 | ||||
-rw-r--r-- | fs/cifs/cifsencrypt.c | 8 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 37 | ||||
-rw-r--r-- | fs/cifs/cifsproto.h | 16 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 393 | ||||
-rw-r--r-- | fs/cifs/connect.c | 254 | ||||
-rw-r--r-- | fs/cifs/dir.c | 43 | ||||
-rw-r--r-- | fs/cifs/dns_resolve.c | 16 | ||||
-rw-r--r-- | fs/cifs/export.c | 2 | ||||
-rw-r--r-- | fs/cifs/file.c | 172 | ||||
-rw-r--r-- | fs/cifs/inode.c | 82 | ||||
-rw-r--r-- | fs/cifs/ioctl.c | 10 | ||||
-rw-r--r-- | fs/cifs/link.c | 10 | ||||
-rw-r--r-- | fs/cifs/misc.c | 81 | ||||
-rw-r--r-- | fs/cifs/netmisc.c | 16 | ||||
-rw-r--r-- | fs/cifs/readdir.c | 85 | ||||
-rw-r--r-- | fs/cifs/sess.c | 58 | ||||
-rw-r--r-- | fs/cifs/transport.c | 91 | ||||
-rw-r--r-- | fs/cifs/xattr.c | 40 |
25 files changed, 845 insertions, 835 deletions
diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c index a20bea598933..6d555c05dba9 100644 --- a/fs/cifs/asn1.c +++ b/fs/cifs/asn1.c | |||
@@ -510,11 +510,11 @@ decode_negTokenInit(unsigned char *security_blob, int length, | |||
510 | 510 | ||
511 | /* GSSAPI header */ | 511 | /* GSSAPI header */ |
512 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { | 512 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { |
513 | cFYI(1, ("Error decoding negTokenInit header")); | 513 | cFYI(1, "Error decoding negTokenInit header"); |
514 | return 0; | 514 | return 0; |
515 | } else if ((cls != ASN1_APL) || (con != ASN1_CON) | 515 | } else if ((cls != ASN1_APL) || (con != ASN1_CON) |
516 | || (tag != ASN1_EOC)) { | 516 | || (tag != ASN1_EOC)) { |
517 | cFYI(1, ("cls = %d con = %d tag = %d", cls, con, tag)); | 517 | cFYI(1, "cls = %d con = %d tag = %d", cls, con, tag); |
518 | return 0; | 518 | return 0; |
519 | } | 519 | } |
520 | 520 | ||
@@ -535,56 +535,52 @@ decode_negTokenInit(unsigned char *security_blob, int length, | |||
535 | 535 | ||
536 | /* SPNEGO OID not present or garbled -- bail out */ | 536 | /* SPNEGO OID not present or garbled -- bail out */ |
537 | if (!rc) { | 537 | if (!rc) { |
538 | cFYI(1, ("Error decoding negTokenInit header")); | 538 | cFYI(1, "Error decoding negTokenInit header"); |
539 | return 0; | 539 | return 0; |
540 | } | 540 | } |
541 | 541 | ||
542 | /* SPNEGO */ | 542 | /* SPNEGO */ |
543 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { | 543 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { |
544 | cFYI(1, ("Error decoding negTokenInit")); | 544 | cFYI(1, "Error decoding negTokenInit"); |
545 | return 0; | 545 | return 0; |
546 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON) | 546 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON) |
547 | || (tag != ASN1_EOC)) { | 547 | || (tag != ASN1_EOC)) { |
548 | cFYI(1, | 548 | cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 0", |
549 | ("cls = %d con = %d tag = %d end = %p (%d) exit 0", | 549 | cls, con, tag, end, *end); |
550 | cls, con, tag, end, *end)); | ||
551 | return 0; | 550 | return 0; |
552 | } | 551 | } |
553 | 552 | ||
554 | /* negTokenInit */ | 553 | /* negTokenInit */ |
555 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { | 554 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { |
556 | cFYI(1, ("Error decoding negTokenInit")); | 555 | cFYI(1, "Error decoding negTokenInit"); |
557 | return 0; | 556 | return 0; |
558 | } else if ((cls != ASN1_UNI) || (con != ASN1_CON) | 557 | } else if ((cls != ASN1_UNI) || (con != ASN1_CON) |
559 | || (tag != ASN1_SEQ)) { | 558 | || (tag != ASN1_SEQ)) { |
560 | cFYI(1, | 559 | cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 1", |
561 | ("cls = %d con = %d tag = %d end = %p (%d) exit 1", | 560 | cls, con, tag, end, *end); |
562 | cls, con, tag, end, *end)); | ||
563 | return 0; | 561 | return 0; |
564 | } | 562 | } |
565 | 563 | ||
566 | /* sequence */ | 564 | /* sequence */ |
567 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { | 565 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { |
568 | cFYI(1, ("Error decoding 2nd part of negTokenInit")); | 566 | cFYI(1, "Error decoding 2nd part of negTokenInit"); |
569 | return 0; | 567 | return 0; |
570 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON) | 568 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON) |
571 | || (tag != ASN1_EOC)) { | 569 | || (tag != ASN1_EOC)) { |
572 | cFYI(1, | 570 | cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 0", |
573 | ("cls = %d con = %d tag = %d end = %p (%d) exit 0", | 571 | cls, con, tag, end, *end); |
574 | cls, con, tag, end, *end)); | ||
575 | return 0; | 572 | return 0; |
576 | } | 573 | } |
577 | 574 | ||
578 | /* sequence of */ | 575 | /* sequence of */ |
579 | if (asn1_header_decode | 576 | if (asn1_header_decode |
580 | (&ctx, &sequence_end, &cls, &con, &tag) == 0) { | 577 | (&ctx, &sequence_end, &cls, &con, &tag) == 0) { |
581 | cFYI(1, ("Error decoding 2nd part of negTokenInit")); | 578 | cFYI(1, "Error decoding 2nd part of negTokenInit"); |
582 | return 0; | 579 | return 0; |
583 | } else if ((cls != ASN1_UNI) || (con != ASN1_CON) | 580 | } else if ((cls != ASN1_UNI) || (con != ASN1_CON) |
584 | || (tag != ASN1_SEQ)) { | 581 | || (tag != ASN1_SEQ)) { |
585 | cFYI(1, | 582 | cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 1", |
586 | ("cls = %d con = %d tag = %d end = %p (%d) exit 1", | 583 | cls, con, tag, end, *end); |
587 | cls, con, tag, end, *end)); | ||
588 | return 0; | 584 | return 0; |
589 | } | 585 | } |
590 | 586 | ||
@@ -592,16 +588,15 @@ decode_negTokenInit(unsigned char *security_blob, int length, | |||
592 | while (!asn1_eoc_decode(&ctx, sequence_end)) { | 588 | while (!asn1_eoc_decode(&ctx, sequence_end)) { |
593 | rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag); | 589 | rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag); |
594 | if (!rc) { | 590 | if (!rc) { |
595 | cFYI(1, | 591 | cFYI(1, "Error decoding negTokenInit hdr exit2"); |
596 | ("Error decoding negTokenInit hdr exit2")); | ||
597 | return 0; | 592 | return 0; |
598 | } | 593 | } |
599 | if ((tag == ASN1_OJI) && (con == ASN1_PRI)) { | 594 | if ((tag == ASN1_OJI) && (con == ASN1_PRI)) { |
600 | if (asn1_oid_decode(&ctx, end, &oid, &oidlen)) { | 595 | if (asn1_oid_decode(&ctx, end, &oid, &oidlen)) { |
601 | 596 | ||
602 | cFYI(1, ("OID len = %d oid = 0x%lx 0x%lx " | 597 | cFYI(1, "OID len = %d oid = 0x%lx 0x%lx " |
603 | "0x%lx 0x%lx", oidlen, *oid, | 598 | "0x%lx 0x%lx", oidlen, *oid, |
604 | *(oid + 1), *(oid + 2), *(oid + 3))); | 599 | *(oid + 1), *(oid + 2), *(oid + 3)); |
605 | 600 | ||
606 | if (compare_oid(oid, oidlen, MSKRB5_OID, | 601 | if (compare_oid(oid, oidlen, MSKRB5_OID, |
607 | MSKRB5_OID_LEN) && | 602 | MSKRB5_OID_LEN) && |
@@ -622,7 +617,7 @@ decode_negTokenInit(unsigned char *security_blob, int length, | |||
622 | kfree(oid); | 617 | kfree(oid); |
623 | } | 618 | } |
624 | } else { | 619 | } else { |
625 | cFYI(1, ("Should be an oid what is going on?")); | 620 | cFYI(1, "Should be an oid what is going on?"); |
626 | } | 621 | } |
627 | } | 622 | } |
628 | 623 | ||
@@ -632,47 +627,47 @@ decode_negTokenInit(unsigned char *security_blob, int length, | |||
632 | no mechListMic (e.g. NTLMSSP instead of KRB5) */ | 627 | no mechListMic (e.g. NTLMSSP instead of KRB5) */ |
633 | if (ctx.error == ASN1_ERR_DEC_EMPTY) | 628 | if (ctx.error == ASN1_ERR_DEC_EMPTY) |
634 | goto decode_negtoken_exit; | 629 | goto decode_negtoken_exit; |
635 | cFYI(1, ("Error decoding last part negTokenInit exit3")); | 630 | cFYI(1, "Error decoding last part negTokenInit exit3"); |
636 | return 0; | 631 | return 0; |
637 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) { | 632 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) { |
638 | /* tag = 3 indicating mechListMIC */ | 633 | /* tag = 3 indicating mechListMIC */ |
639 | cFYI(1, ("Exit 4 cls = %d con = %d tag = %d end = %p (%d)", | 634 | cFYI(1, "Exit 4 cls = %d con = %d tag = %d end = %p (%d)", |
640 | cls, con, tag, end, *end)); | 635 | cls, con, tag, end, *end); |
641 | return 0; | 636 | return 0; |
642 | } | 637 | } |
643 | 638 | ||
644 | /* sequence */ | 639 | /* sequence */ |
645 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { | 640 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { |
646 | cFYI(1, ("Error decoding last part negTokenInit exit5")); | 641 | cFYI(1, "Error decoding last part negTokenInit exit5"); |
647 | return 0; | 642 | return 0; |
648 | } else if ((cls != ASN1_UNI) || (con != ASN1_CON) | 643 | } else if ((cls != ASN1_UNI) || (con != ASN1_CON) |
649 | || (tag != ASN1_SEQ)) { | 644 | || (tag != ASN1_SEQ)) { |
650 | cFYI(1, ("cls = %d con = %d tag = %d end = %p (%d)", | 645 | cFYI(1, "cls = %d con = %d tag = %d end = %p (%d)", |
651 | cls, con, tag, end, *end)); | 646 | cls, con, tag, end, *end); |
652 | } | 647 | } |
653 | 648 | ||
654 | /* sequence of */ | 649 | /* sequence of */ |
655 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { | 650 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { |
656 | cFYI(1, ("Error decoding last part negTokenInit exit 7")); | 651 | cFYI(1, "Error decoding last part negTokenInit exit 7"); |
657 | return 0; | 652 | return 0; |
658 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) { | 653 | } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) { |
659 | cFYI(1, ("Exit 8 cls = %d con = %d tag = %d end = %p (%d)", | 654 | cFYI(1, "Exit 8 cls = %d con = %d tag = %d end = %p (%d)", |
660 | cls, con, tag, end, *end)); | 655 | cls, con, tag, end, *end); |
661 | return 0; | 656 | return 0; |
662 | } | 657 | } |
663 | 658 | ||
664 | /* general string */ | 659 | /* general string */ |
665 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { | 660 | if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { |
666 | cFYI(1, ("Error decoding last part negTokenInit exit9")); | 661 | cFYI(1, "Error decoding last part negTokenInit exit9"); |
667 | return 0; | 662 | return 0; |
668 | } else if ((cls != ASN1_UNI) || (con != ASN1_PRI) | 663 | } else if ((cls != ASN1_UNI) || (con != ASN1_PRI) |
669 | || (tag != ASN1_GENSTR)) { | 664 | || (tag != ASN1_GENSTR)) { |
670 | cFYI(1, ("Exit10 cls = %d con = %d tag = %d end = %p (%d)", | 665 | cFYI(1, "Exit10 cls = %d con = %d tag = %d end = %p (%d)", |
671 | cls, con, tag, end, *end)); | 666 | cls, con, tag, end, *end); |
672 | return 0; | 667 | return 0; |
673 | } | 668 | } |
674 | cFYI(1, ("Need to call asn1_octets_decode() function for %s", | 669 | cFYI(1, "Need to call asn1_octets_decode() function for %s", |
675 | ctx.pointer)); /* is this UTF-8 or ASCII? */ | 670 | ctx.pointer); /* is this UTF-8 or ASCII? */ |
676 | decode_negtoken_exit: | 671 | decode_negtoken_exit: |
677 | if (use_kerberos) | 672 | if (use_kerberos) |
678 | *secType = Kerberos; | 673 | *secType = Kerberos; |
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 42cec2a7c0cf..54951804734c 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
@@ -60,10 +60,10 @@ cifs_dump_mem(char *label, void *data, int length) | |||
60 | #ifdef CONFIG_CIFS_DEBUG2 | 60 | #ifdef CONFIG_CIFS_DEBUG2 |
61 | void cifs_dump_detail(struct smb_hdr *smb) | 61 | void cifs_dump_detail(struct smb_hdr *smb) |
62 | { | 62 | { |
63 | cERROR(1, ("Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d", | 63 | cERROR(1, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d", |
64 | smb->Command, smb->Status.CifsError, | 64 | smb->Command, smb->Status.CifsError, |
65 | smb->Flags, smb->Flags2, smb->Mid, smb->Pid)); | 65 | smb->Flags, smb->Flags2, smb->Mid, smb->Pid); |
66 | cERROR(1, ("smb buf %p len %d", smb, smbCalcSize_LE(smb))); | 66 | cERROR(1, "smb buf %p len %d", smb, smbCalcSize_LE(smb)); |
67 | } | 67 | } |
68 | 68 | ||
69 | 69 | ||
@@ -75,25 +75,25 @@ void cifs_dump_mids(struct TCP_Server_Info *server) | |||
75 | if (server == NULL) | 75 | if (server == NULL) |
76 | return; | 76 | return; |
77 | 77 | ||
78 | cERROR(1, ("Dump pending requests:")); | 78 | cERROR(1, "Dump pending requests:"); |
79 | spin_lock(&GlobalMid_Lock); | 79 | spin_lock(&GlobalMid_Lock); |
80 | list_for_each(tmp, &server->pending_mid_q) { | 80 | list_for_each(tmp, &server->pending_mid_q) { |
81 | mid_entry = list_entry(tmp, struct mid_q_entry, qhead); | 81 | mid_entry = list_entry(tmp, struct mid_q_entry, qhead); |
82 | cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d", | 82 | cERROR(1, "State: %d Cmd: %d Pid: %d Tsk: %p Mid %d", |
83 | mid_entry->midState, | 83 | mid_entry->midState, |
84 | (int)mid_entry->command, | 84 | (int)mid_entry->command, |
85 | mid_entry->pid, | 85 | mid_entry->pid, |
86 | mid_entry->tsk, | 86 | mid_entry->tsk, |
87 | mid_entry->mid)); | 87 | mid_entry->mid); |
88 | #ifdef CONFIG_CIFS_STATS2 | 88 | #ifdef CONFIG_CIFS_STATS2 |
89 | cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld", | 89 | cERROR(1, "IsLarge: %d buf: %p time rcv: %ld now: %ld", |
90 | mid_entry->largeBuf, | 90 | mid_entry->largeBuf, |
91 | mid_entry->resp_buf, | 91 | mid_entry->resp_buf, |
92 | mid_entry->when_received, | 92 | mid_entry->when_received, |
93 | jiffies)); | 93 | jiffies); |
94 | #endif /* STATS2 */ | 94 | #endif /* STATS2 */ |
95 | cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry->multiRsp, | 95 | cERROR(1, "IsMult: %d IsEnd: %d", mid_entry->multiRsp, |
96 | mid_entry->multiEnd)); | 96 | mid_entry->multiEnd); |
97 | if (mid_entry->resp_buf) { | 97 | if (mid_entry->resp_buf) { |
98 | cifs_dump_detail(mid_entry->resp_buf); | 98 | cifs_dump_detail(mid_entry->resp_buf); |
99 | cifs_dump_mem("existing buf: ", | 99 | cifs_dump_mem("existing buf: ", |
@@ -750,7 +750,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file, | |||
750 | extended_security = CIFSSEC_MAX; | 750 | extended_security = CIFSSEC_MAX; |
751 | return count; | 751 | return count; |
752 | } else if (!isdigit(c)) { | 752 | } else if (!isdigit(c)) { |
753 | cERROR(1, ("invalid flag %c", c)); | 753 | cERROR(1, "invalid flag %c", c); |
754 | return -EINVAL; | 754 | return -EINVAL; |
755 | } | 755 | } |
756 | } | 756 | } |
@@ -758,16 +758,16 @@ static ssize_t cifs_security_flags_proc_write(struct file *file, | |||
758 | 758 | ||
759 | flags = simple_strtoul(flags_string, NULL, 0); | 759 | flags = simple_strtoul(flags_string, NULL, 0); |
760 | 760 | ||
761 | cFYI(1, ("sec flags 0x%x", flags)); | 761 | cFYI(1, "sec flags 0x%x", flags); |
762 | 762 | ||
763 | if (flags <= 0) { | 763 | if (flags <= 0) { |
764 | cERROR(1, ("invalid security flags %s", flags_string)); | 764 | cERROR(1, "invalid security flags %s", flags_string); |
765 | return -EINVAL; | 765 | return -EINVAL; |
766 | } | 766 | } |
767 | 767 | ||
768 | if (flags & ~CIFSSEC_MASK) { | 768 | if (flags & ~CIFSSEC_MASK) { |
769 | cERROR(1, ("attempt to set unsupported security flags 0x%x", | 769 | cERROR(1, "attempt to set unsupported security flags 0x%x", |
770 | flags & ~CIFSSEC_MASK)); | 770 | flags & ~CIFSSEC_MASK); |
771 | return -EINVAL; | 771 | return -EINVAL; |
772 | } | 772 | } |
773 | /* flags look ok - update the global security flags for cifs module */ | 773 | /* flags look ok - update the global security flags for cifs module */ |
@@ -775,9 +775,9 @@ static ssize_t cifs_security_flags_proc_write(struct file *file, | |||
775 | if (extended_security & CIFSSEC_MUST_SIGN) { | 775 | if (extended_security & CIFSSEC_MUST_SIGN) { |
776 | /* requiring signing implies signing is allowed */ | 776 | /* requiring signing implies signing is allowed */ |
777 | extended_security |= CIFSSEC_MAY_SIGN; | 777 | extended_security |= CIFSSEC_MAY_SIGN; |
778 | cFYI(1, ("packet signing now required")); | 778 | cFYI(1, "packet signing now required"); |
779 | } else if ((extended_security & CIFSSEC_MAY_SIGN) == 0) { | 779 | } else if ((extended_security & CIFSSEC_MAY_SIGN) == 0) { |
780 | cFYI(1, ("packet signing disabled")); | 780 | cFYI(1, "packet signing disabled"); |
781 | } | 781 | } |
782 | /* BB should we turn on MAY flags for other MUST options? */ | 782 | /* BB should we turn on MAY flags for other MUST options? */ |
783 | return count; | 783 | return count; |
diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h index 5eb3b83bbfa7..aa316891ac0c 100644 --- a/fs/cifs/cifs_debug.h +++ b/fs/cifs/cifs_debug.h | |||
@@ -43,34 +43,54 @@ void dump_smb(struct smb_hdr *, int); | |||
43 | */ | 43 | */ |
44 | #ifdef CIFS_DEBUG | 44 | #ifdef CIFS_DEBUG |
45 | 45 | ||
46 | |||
47 | /* information message: e.g., configuration, major event */ | 46 | /* information message: e.g., configuration, major event */ |
48 | extern int cifsFYI; | 47 | extern int cifsFYI; |
49 | #define cifsfyi(format,arg...) if (cifsFYI & CIFS_INFO) printk(KERN_DEBUG " " __FILE__ ": " format "\n" "" , ## arg) | 48 | #define cifsfyi(fmt, arg...) \ |
49 | do { \ | ||
50 | if (cifsFYI & CIFS_INFO) \ | ||
51 | printk(KERN_DEBUG "%s: " fmt "\n", __FILE__, ##arg); \ | ||
52 | } while (0) | ||
50 | 53 | ||
51 | #define cFYI(button,prspec) if (button) cifsfyi prspec | 54 | #define cFYI(set, fmt, arg...) \ |
55 | do { \ | ||
56 | if (set) \ | ||
57 | cifsfyi(fmt, ##arg); \ | ||
58 | } while (0) | ||
52 | 59 | ||
53 | #define cifswarn(format, arg...) printk(KERN_WARNING ": " format "\n" , ## arg) | 60 | #define cifswarn(fmt, arg...) \ |
61 | printk(KERN_WARNING fmt "\n", ##arg) | ||
54 | 62 | ||
55 | /* debug event message: */ | 63 | /* debug event message: */ |
56 | extern int cifsERROR; | 64 | extern int cifsERROR; |
57 | 65 | ||
58 | #define cEVENT(format,arg...) if (cifsERROR) printk(KERN_EVENT __FILE__ ": " format "\n" , ## arg) | 66 | #define cEVENT(fmt, arg...) \ |
67 | do { \ | ||
68 | if (cifsERROR) \ | ||
69 | printk(KERN_EVENT "%s: " fmt "\n", __FILE__, ##arg); \ | ||
70 | } while (0) | ||
59 | 71 | ||
60 | /* error event message: e.g., i/o error */ | 72 | /* error event message: e.g., i/o error */ |
61 | #define cifserror(format,arg...) if (cifsERROR) printk(KERN_ERR " CIFS VFS: " format "\n" "" , ## arg) | 73 | #define cifserror(fmt, arg...) \ |
74 | do { \ | ||
75 | if (cifsERROR) \ | ||
76 | printk(KERN_ERR "CIFS VFS: " fmt "\n", ##arg); \ | ||
77 | } while (0) | ||
62 | 78 | ||
63 | #define cERROR(button, prspec) if (button) cifserror prspec | 79 | #define cERROR(set, fmt, arg...) \ |
80 | do { \ | ||
81 | if (set) \ | ||
82 | cifserror(fmt, ##arg); \ | ||
83 | } while (0) | ||
64 | 84 | ||
65 | /* | 85 | /* |
66 | * debug OFF | 86 | * debug OFF |
67 | * --------- | 87 | * --------- |
68 | */ | 88 | */ |
69 | #else /* _CIFS_DEBUG */ | 89 | #else /* _CIFS_DEBUG */ |
70 | #define cERROR(button, prspec) | 90 | #define cERROR(set, fmt, arg...) |
71 | #define cEVENT(format, arg...) | 91 | #define cEVENT(fmt, arg...) |
72 | #define cFYI(button, prspec) | 92 | #define cFYI(set, fmt, arg...) |
73 | #define cifserror(format, arg...) | 93 | #define cifserror(fmt, arg...) |
74 | #endif /* _CIFS_DEBUG */ | 94 | #endif /* _CIFS_DEBUG */ |
75 | 95 | ||
76 | #endif /* _H_CIFS_DEBUG */ | 96 | #endif /* _H_CIFS_DEBUG */ |
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index 78e4d2a3a68b..ac19a6f3dae0 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c | |||
@@ -85,8 +85,8 @@ static char *cifs_get_share_name(const char *node_name) | |||
85 | /* find server name end */ | 85 | /* find server name end */ |
86 | pSep = memchr(UNC+2, '\\', len-2); | 86 | pSep = memchr(UNC+2, '\\', len-2); |
87 | if (!pSep) { | 87 | if (!pSep) { |
88 | cERROR(1, ("%s: no server name end in node name: %s", | 88 | cERROR(1, "%s: no server name end in node name: %s", |
89 | __func__, node_name)); | 89 | __func__, node_name); |
90 | kfree(UNC); | 90 | kfree(UNC); |
91 | return ERR_PTR(-EINVAL); | 91 | return ERR_PTR(-EINVAL); |
92 | } | 92 | } |
@@ -142,8 +142,8 @@ char *cifs_compose_mount_options(const char *sb_mountdata, | |||
142 | 142 | ||
143 | rc = dns_resolve_server_name_to_ip(*devname, &srvIP); | 143 | rc = dns_resolve_server_name_to_ip(*devname, &srvIP); |
144 | if (rc != 0) { | 144 | if (rc != 0) { |
145 | cERROR(1, ("%s: Failed to resolve server part of %s to IP: %d", | 145 | cERROR(1, "%s: Failed to resolve server part of %s to IP: %d", |
146 | __func__, *devname, rc)); | 146 | __func__, *devname, rc); |
147 | goto compose_mount_options_err; | 147 | goto compose_mount_options_err; |
148 | } | 148 | } |
149 | /* md_len = strlen(...) + 12 for 'sep+prefixpath=' | 149 | /* md_len = strlen(...) + 12 for 'sep+prefixpath=' |
@@ -217,8 +217,8 @@ char *cifs_compose_mount_options(const char *sb_mountdata, | |||
217 | strcat(mountdata, fullpath + ref->path_consumed); | 217 | strcat(mountdata, fullpath + ref->path_consumed); |
218 | } | 218 | } |
219 | 219 | ||
220 | /*cFYI(1,("%s: parent mountdata: %s", __func__,sb_mountdata));*/ | 220 | /*cFYI(1, "%s: parent mountdata: %s", __func__,sb_mountdata);*/ |
221 | /*cFYI(1, ("%s: submount mountdata: %s", __func__, mountdata ));*/ | 221 | /*cFYI(1, "%s: submount mountdata: %s", __func__, mountdata );*/ |
222 | 222 | ||
223 | compose_mount_options_out: | 223 | compose_mount_options_out: |
224 | kfree(srvIP); | 224 | kfree(srvIP); |
@@ -294,11 +294,11 @@ static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd, | |||
294 | 294 | ||
295 | static void dump_referral(const struct dfs_info3_param *ref) | 295 | static void dump_referral(const struct dfs_info3_param *ref) |
296 | { | 296 | { |
297 | cFYI(1, ("DFS: ref path: %s", ref->path_name)); | 297 | cFYI(1, "DFS: ref path: %s", ref->path_name); |
298 | cFYI(1, ("DFS: node path: %s", ref->node_name)); | 298 | cFYI(1, "DFS: node path: %s", ref->node_name); |
299 | cFYI(1, ("DFS: fl: %hd, srv_type: %hd", ref->flags, ref->server_type)); | 299 | cFYI(1, "DFS: fl: %hd, srv_type: %hd", ref->flags, ref->server_type); |
300 | cFYI(1, ("DFS: ref_flags: %hd, path_consumed: %hd", ref->ref_flag, | 300 | cFYI(1, "DFS: ref_flags: %hd, path_consumed: %hd", ref->ref_flag, |
301 | ref->path_consumed)); | 301 | ref->path_consumed); |
302 | } | 302 | } |
303 | 303 | ||
304 | 304 | ||
@@ -314,7 +314,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) | |||
314 | int rc = 0; | 314 | int rc = 0; |
315 | struct vfsmount *mnt = ERR_PTR(-ENOENT); | 315 | struct vfsmount *mnt = ERR_PTR(-ENOENT); |
316 | 316 | ||
317 | cFYI(1, ("in %s", __func__)); | 317 | cFYI(1, "in %s", __func__); |
318 | BUG_ON(IS_ROOT(dentry)); | 318 | BUG_ON(IS_ROOT(dentry)); |
319 | 319 | ||
320 | xid = GetXid(); | 320 | xid = GetXid(); |
@@ -352,15 +352,15 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) | |||
352 | /* connect to a node */ | 352 | /* connect to a node */ |
353 | len = strlen(referrals[i].node_name); | 353 | len = strlen(referrals[i].node_name); |
354 | if (len < 2) { | 354 | if (len < 2) { |
355 | cERROR(1, ("%s: Net Address path too short: %s", | 355 | cERROR(1, "%s: Net Address path too short: %s", |
356 | __func__, referrals[i].node_name)); | 356 | __func__, referrals[i].node_name); |
357 | rc = -EINVAL; | 357 | rc = -EINVAL; |
358 | goto out_err; | 358 | goto out_err; |
359 | } | 359 | } |
360 | mnt = cifs_dfs_do_refmount(nd->path.mnt, | 360 | mnt = cifs_dfs_do_refmount(nd->path.mnt, |
361 | nd->path.dentry, referrals + i); | 361 | nd->path.dentry, referrals + i); |
362 | cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__, | 362 | cFYI(1, "%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__, |
363 | referrals[i].node_name, mnt)); | 363 | referrals[i].node_name, mnt); |
364 | 364 | ||
365 | /* complete mount procedure if we accured submount */ | 365 | /* complete mount procedure if we accured submount */ |
366 | if (!IS_ERR(mnt)) | 366 | if (!IS_ERR(mnt)) |
@@ -378,7 +378,7 @@ out: | |||
378 | FreeXid(xid); | 378 | FreeXid(xid); |
379 | free_dfs_info_array(referrals, num_referrals); | 379 | free_dfs_info_array(referrals, num_referrals); |
380 | kfree(full_path); | 380 | kfree(full_path); |
381 | cFYI(1, ("leaving %s" , __func__)); | 381 | cFYI(1, "leaving %s" , __func__); |
382 | return ERR_PTR(rc); | 382 | return ERR_PTR(rc); |
383 | out_err: | 383 | out_err: |
384 | path_put(&nd->path); | 384 | path_put(&nd->path); |
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 310d12f69a92..c53587b83309 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c | |||
@@ -149,7 +149,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | |||
149 | dp = description + strlen(description); | 149 | dp = description + strlen(description); |
150 | sprintf(dp, ";pid=0x%x", current->pid); | 150 | sprintf(dp, ";pid=0x%x", current->pid); |
151 | 151 | ||
152 | cFYI(1, ("key description = %s", description)); | 152 | cFYI(1, "key description = %s", description); |
153 | spnego_key = request_key(&cifs_spnego_key_type, description, ""); | 153 | spnego_key = request_key(&cifs_spnego_key_type, description, ""); |
154 | 154 | ||
155 | #ifdef CONFIG_CIFS_DEBUG2 | 155 | #ifdef CONFIG_CIFS_DEBUG2 |
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index d07676bd76d2..430f510a1720 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c | |||
@@ -200,9 +200,8 @@ cifs_strtoUCS(__le16 *to, const char *from, int len, | |||
200 | /* works for 2.4.0 kernel or later */ | 200 | /* works for 2.4.0 kernel or later */ |
201 | charlen = codepage->char2uni(from, len, &wchar_to[i]); | 201 | charlen = codepage->char2uni(from, len, &wchar_to[i]); |
202 | if (charlen < 1) { | 202 | if (charlen < 1) { |
203 | cERROR(1, | 203 | cERROR(1, "strtoUCS: char2uni of %d returned %d", |
204 | ("strtoUCS: char2uni of %d returned %d", | 204 | (int)*from, charlen); |
205 | (int)*from, charlen)); | ||
206 | /* A question mark */ | 205 | /* A question mark */ |
207 | to[i] = cpu_to_le16(0x003f); | 206 | to[i] = cpu_to_le16(0x003f); |
208 | charlen = 1; | 207 | charlen = 1; |
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 9b716d044bbd..85d7cf7ff2c8 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c | |||
@@ -87,11 +87,11 @@ int match_sid(struct cifs_sid *ctsid) | |||
87 | continue; /* all sub_auth values do not match */ | 87 | continue; /* all sub_auth values do not match */ |
88 | } | 88 | } |
89 | 89 | ||
90 | cFYI(1, ("matching sid: %s\n", wksidarr[i].sidname)); | 90 | cFYI(1, "matching sid: %s\n", wksidarr[i].sidname); |
91 | return 0; /* sids compare/match */ | 91 | return 0; /* sids compare/match */ |
92 | } | 92 | } |
93 | 93 | ||
94 | cFYI(1, ("No matching sid")); | 94 | cFYI(1, "No matching sid"); |
95 | return -1; | 95 | return -1; |
96 | } | 96 | } |
97 | 97 | ||
@@ -208,14 +208,14 @@ static void access_flags_to_mode(__le32 ace_flags, int type, umode_t *pmode, | |||
208 | *pbits_to_set &= ~S_IXUGO; | 208 | *pbits_to_set &= ~S_IXUGO; |
209 | return; | 209 | return; |
210 | } else if (type != ACCESS_ALLOWED) { | 210 | } else if (type != ACCESS_ALLOWED) { |
211 | cERROR(1, ("unknown access control type %d", type)); | 211 | cERROR(1, "unknown access control type %d", type); |
212 | return; | 212 | return; |
213 | } | 213 | } |
214 | /* else ACCESS_ALLOWED type */ | 214 | /* else ACCESS_ALLOWED type */ |
215 | 215 | ||
216 | if (flags & GENERIC_ALL) { | 216 | if (flags & GENERIC_ALL) { |
217 | *pmode |= (S_IRWXUGO & (*pbits_to_set)); | 217 | *pmode |= (S_IRWXUGO & (*pbits_to_set)); |
218 | cFYI(DBG2, ("all perms")); | 218 | cFYI(DBG2, "all perms"); |
219 | return; | 219 | return; |
220 | } | 220 | } |
221 | if ((flags & GENERIC_WRITE) || | 221 | if ((flags & GENERIC_WRITE) || |
@@ -228,7 +228,7 @@ static void access_flags_to_mode(__le32 ace_flags, int type, umode_t *pmode, | |||
228 | ((flags & FILE_EXEC_RIGHTS) == FILE_EXEC_RIGHTS)) | 228 | ((flags & FILE_EXEC_RIGHTS) == FILE_EXEC_RIGHTS)) |
229 | *pmode |= (S_IXUGO & (*pbits_to_set)); | 229 | *pmode |= (S_IXUGO & (*pbits_to_set)); |
230 | 230 | ||
231 | cFYI(DBG2, ("access flags 0x%x mode now 0x%x", flags, *pmode)); | 231 | cFYI(DBG2, "access flags 0x%x mode now 0x%x", flags, *pmode); |
232 | return; | 232 | return; |
233 | } | 233 | } |
234 | 234 | ||
@@ -257,7 +257,7 @@ static void mode_to_access_flags(umode_t mode, umode_t bits_to_use, | |||
257 | if (mode & S_IXUGO) | 257 | if (mode & S_IXUGO) |
258 | *pace_flags |= SET_FILE_EXEC_RIGHTS; | 258 | *pace_flags |= SET_FILE_EXEC_RIGHTS; |
259 | 259 | ||
260 | cFYI(DBG2, ("mode: 0x%x, access flags now 0x%x", mode, *pace_flags)); | 260 | cFYI(DBG2, "mode: 0x%x, access flags now 0x%x", mode, *pace_flags); |
261 | return; | 261 | return; |
262 | } | 262 | } |
263 | 263 | ||
@@ -297,24 +297,24 @@ static void dump_ace(struct cifs_ace *pace, char *end_of_acl) | |||
297 | /* validate that we do not go past end of acl */ | 297 | /* validate that we do not go past end of acl */ |
298 | 298 | ||
299 | if (le16_to_cpu(pace->size) < 16) { | 299 | if (le16_to_cpu(pace->size) < 16) { |
300 | cERROR(1, ("ACE too small, %d", le16_to_cpu(pace->size))); | 300 | cERROR(1, "ACE too small %d", le16_to_cpu(pace->size)); |
301 | return; | 301 | return; |
302 | } | 302 | } |
303 | 303 | ||
304 | if (end_of_acl < (char *)pace + le16_to_cpu(pace->size)) { | 304 | if (end_of_acl < (char *)pace + le16_to_cpu(pace->size)) { |
305 | cERROR(1, ("ACL too small to parse ACE")); | 305 | cERROR(1, "ACL too small to parse ACE"); |
306 | return; | 306 | return; |
307 | } | 307 | } |
308 | 308 | ||
309 | num_subauth = pace->sid.num_subauth; | 309 | num_subauth = pace->sid.num_subauth; |
310 | if (num_subauth) { | 310 | if (num_subauth) { |
311 | int i; | 311 | int i; |
312 | cFYI(1, ("ACE revision %d num_auth %d type %d flags %d size %d", | 312 | cFYI(1, "ACE revision %d num_auth %d type %d flags %d size %d", |
313 | pace->sid.revision, pace->sid.num_subauth, pace->type, | 313 | pace->sid.revision, pace->sid.num_subauth, pace->type, |
314 | pace->flags, le16_to_cpu(pace->size))); | 314 | pace->flags, le16_to_cpu(pace->size)); |
315 | for (i = 0; i < num_subauth; ++i) { | 315 | for (i = 0; i < num_subauth; ++i) { |
316 | cFYI(1, ("ACE sub_auth[%d]: 0x%x", i, | 316 | cFYI(1, "ACE sub_auth[%d]: 0x%x", i, |
317 | le32_to_cpu(pace->sid.sub_auth[i]))); | 317 | le32_to_cpu(pace->sid.sub_auth[i])); |
318 | } | 318 | } |
319 | 319 | ||
320 | /* BB add length check to make sure that we do not have huge | 320 | /* BB add length check to make sure that we do not have huge |
@@ -347,13 +347,13 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl, | |||
347 | 347 | ||
348 | /* validate that we do not go past end of acl */ | 348 | /* validate that we do not go past end of acl */ |
349 | if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) { | 349 | if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) { |
350 | cERROR(1, ("ACL too small to parse DACL")); | 350 | cERROR(1, "ACL too small to parse DACL"); |
351 | return; | 351 | return; |
352 | } | 352 | } |
353 | 353 | ||
354 | cFYI(DBG2, ("DACL revision %d size %d num aces %d", | 354 | cFYI(DBG2, "DACL revision %d size %d num aces %d", |
355 | le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size), | 355 | le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size), |
356 | le32_to_cpu(pdacl->num_aces))); | 356 | le32_to_cpu(pdacl->num_aces)); |
357 | 357 | ||
358 | /* reset rwx permissions for user/group/other. | 358 | /* reset rwx permissions for user/group/other. |
359 | Also, if num_aces is 0 i.e. DACL has no ACEs, | 359 | Also, if num_aces is 0 i.e. DACL has no ACEs, |
@@ -437,25 +437,25 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) | |||
437 | /* validate that we do not go past end of ACL - sid must be at least 8 | 437 | /* validate that we do not go past end of ACL - sid must be at least 8 |
438 | bytes long (assuming no sub-auths - e.g. the null SID */ | 438 | bytes long (assuming no sub-auths - e.g. the null SID */ |
439 | if (end_of_acl < (char *)psid + 8) { | 439 | if (end_of_acl < (char *)psid + 8) { |
440 | cERROR(1, ("ACL too small to parse SID %p", psid)); | 440 | cERROR(1, "ACL too small to parse SID %p", psid); |
441 | return -EINVAL; | 441 | return -EINVAL; |
442 | } | 442 | } |
443 | 443 | ||
444 | if (psid->num_subauth) { | 444 | if (psid->num_subauth) { |
445 | #ifdef CONFIG_CIFS_DEBUG2 | 445 | #ifdef CONFIG_CIFS_DEBUG2 |
446 | int i; | 446 | int i; |
447 | cFYI(1, ("SID revision %d num_auth %d", | 447 | cFYI(1, "SID revision %d num_auth %d", |
448 | psid->revision, psid->num_subauth)); | 448 | psid->revision, psid->num_subauth); |
449 | 449 | ||
450 | for (i = 0; i < psid->num_subauth; i++) { | 450 | for (i = 0; i < psid->num_subauth; i++) { |
451 | cFYI(1, ("SID sub_auth[%d]: 0x%x ", i, | 451 | cFYI(1, "SID sub_auth[%d]: 0x%x ", i, |
452 | le32_to_cpu(psid->sub_auth[i]))); | 452 | le32_to_cpu(psid->sub_auth[i])); |
453 | } | 453 | } |
454 | 454 | ||
455 | /* BB add length check to make sure that we do not have huge | 455 | /* BB add length check to make sure that we do not have huge |
456 | num auths and therefore go off the end */ | 456 | num auths and therefore go off the end */ |
457 | cFYI(1, ("RID 0x%x", | 457 | cFYI(1, "RID 0x%x", |
458 | le32_to_cpu(psid->sub_auth[psid->num_subauth-1]))); | 458 | le32_to_cpu(psid->sub_auth[psid->num_subauth-1])); |
459 | #endif | 459 | #endif |
460 | } | 460 | } |
461 | 461 | ||
@@ -482,11 +482,11 @@ static int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len, | |||
482 | le32_to_cpu(pntsd->gsidoffset)); | 482 | le32_to_cpu(pntsd->gsidoffset)); |
483 | dacloffset = le32_to_cpu(pntsd->dacloffset); | 483 | dacloffset = le32_to_cpu(pntsd->dacloffset); |
484 | dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset); | 484 | dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset); |
485 | cFYI(DBG2, ("revision %d type 0x%x ooffset 0x%x goffset 0x%x " | 485 | cFYI(DBG2, "revision %d type 0x%x ooffset 0x%x goffset 0x%x " |
486 | "sacloffset 0x%x dacloffset 0x%x", | 486 | "sacloffset 0x%x dacloffset 0x%x", |
487 | pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), | 487 | pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), |
488 | le32_to_cpu(pntsd->gsidoffset), | 488 | le32_to_cpu(pntsd->gsidoffset), |
489 | le32_to_cpu(pntsd->sacloffset), dacloffset)); | 489 | le32_to_cpu(pntsd->sacloffset), dacloffset); |
490 | /* cifs_dump_mem("owner_sid: ", owner_sid_ptr, 64); */ | 490 | /* cifs_dump_mem("owner_sid: ", owner_sid_ptr, 64); */ |
491 | rc = parse_sid(owner_sid_ptr, end_of_acl); | 491 | rc = parse_sid(owner_sid_ptr, end_of_acl); |
492 | if (rc) | 492 | if (rc) |
@@ -500,7 +500,7 @@ static int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len, | |||
500 | parse_dacl(dacl_ptr, end_of_acl, owner_sid_ptr, | 500 | parse_dacl(dacl_ptr, end_of_acl, owner_sid_ptr, |
501 | group_sid_ptr, fattr); | 501 | group_sid_ptr, fattr); |
502 | else | 502 | else |
503 | cFYI(1, ("no ACL")); /* BB grant all or default perms? */ | 503 | cFYI(1, "no ACL"); /* BB grant all or default perms? */ |
504 | 504 | ||
505 | /* cifscred->uid = owner_sid_ptr->rid; | 505 | /* cifscred->uid = owner_sid_ptr->rid; |
506 | cifscred->gid = group_sid_ptr->rid; | 506 | cifscred->gid = group_sid_ptr->rid; |
@@ -563,7 +563,7 @@ static struct cifs_ntsd *get_cifs_acl_by_fid(struct cifs_sb_info *cifs_sb, | |||
563 | FreeXid(xid); | 563 | FreeXid(xid); |
564 | 564 | ||
565 | 565 | ||
566 | cFYI(1, ("GetCIFSACL rc = %d ACL len %d", rc, *pacllen)); | 566 | cFYI(1, "GetCIFSACL rc = %d ACL len %d", rc, *pacllen); |
567 | return pntsd; | 567 | return pntsd; |
568 | } | 568 | } |
569 | 569 | ||
@@ -581,12 +581,12 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb, | |||
581 | &fid, &oplock, NULL, cifs_sb->local_nls, | 581 | &fid, &oplock, NULL, cifs_sb->local_nls, |
582 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 582 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
583 | if (rc) { | 583 | if (rc) { |
584 | cERROR(1, ("Unable to open file to get ACL")); | 584 | cERROR(1, "Unable to open file to get ACL"); |
585 | goto out; | 585 | goto out; |
586 | } | 586 | } |
587 | 587 | ||
588 | rc = CIFSSMBGetCIFSACL(xid, cifs_sb->tcon, fid, &pntsd, pacllen); | 588 | rc = CIFSSMBGetCIFSACL(xid, cifs_sb->tcon, fid, &pntsd, pacllen); |
589 | cFYI(1, ("GetCIFSACL rc = %d ACL len %d", rc, *pacllen)); | 589 | cFYI(1, "GetCIFSACL rc = %d ACL len %d", rc, *pacllen); |
590 | 590 | ||
591 | CIFSSMBClose(xid, cifs_sb->tcon, fid); | 591 | CIFSSMBClose(xid, cifs_sb->tcon, fid); |
592 | out: | 592 | out: |
@@ -621,7 +621,7 @@ static int set_cifs_acl_by_fid(struct cifs_sb_info *cifs_sb, __u16 fid, | |||
621 | rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen); | 621 | rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen); |
622 | FreeXid(xid); | 622 | FreeXid(xid); |
623 | 623 | ||
624 | cFYI(DBG2, ("SetCIFSACL rc = %d", rc)); | 624 | cFYI(DBG2, "SetCIFSACL rc = %d", rc); |
625 | return rc; | 625 | return rc; |
626 | } | 626 | } |
627 | 627 | ||
@@ -638,12 +638,12 @@ static int set_cifs_acl_by_path(struct cifs_sb_info *cifs_sb, const char *path, | |||
638 | &fid, &oplock, NULL, cifs_sb->local_nls, | 638 | &fid, &oplock, NULL, cifs_sb->local_nls, |
639 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 639 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
640 | if (rc) { | 640 | if (rc) { |
641 | cERROR(1, ("Unable to open file to set ACL")); | 641 | cERROR(1, "Unable to open file to set ACL"); |
642 | goto out; | 642 | goto out; |
643 | } | 643 | } |
644 | 644 | ||
645 | rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen); | 645 | rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen); |
646 | cFYI(DBG2, ("SetCIFSACL rc = %d", rc)); | 646 | cFYI(DBG2, "SetCIFSACL rc = %d", rc); |
647 | 647 | ||
648 | CIFSSMBClose(xid, cifs_sb->tcon, fid); | 648 | CIFSSMBClose(xid, cifs_sb->tcon, fid); |
649 | out: | 649 | out: |
@@ -659,7 +659,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen, | |||
659 | struct cifsFileInfo *open_file; | 659 | struct cifsFileInfo *open_file; |
660 | int rc; | 660 | int rc; |
661 | 661 | ||
662 | cFYI(DBG2, ("set ACL for %s from mode 0x%x", path, inode->i_mode)); | 662 | cFYI(DBG2, "set ACL for %s from mode 0x%x", path, inode->i_mode); |
663 | 663 | ||
664 | open_file = find_readable_file(CIFS_I(inode)); | 664 | open_file = find_readable_file(CIFS_I(inode)); |
665 | if (!open_file) | 665 | if (!open_file) |
@@ -679,7 +679,7 @@ cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr, | |||
679 | u32 acllen = 0; | 679 | u32 acllen = 0; |
680 | int rc = 0; | 680 | int rc = 0; |
681 | 681 | ||
682 | cFYI(DBG2, ("converting ACL to mode for %s", path)); | 682 | cFYI(DBG2, "converting ACL to mode for %s", path); |
683 | 683 | ||
684 | if (pfid) | 684 | if (pfid) |
685 | pntsd = get_cifs_acl_by_fid(cifs_sb, *pfid, &acllen); | 685 | pntsd = get_cifs_acl_by_fid(cifs_sb, *pfid, &acllen); |
@@ -690,7 +690,7 @@ cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr, | |||
690 | if (pntsd) | 690 | if (pntsd) |
691 | rc = parse_sec_desc(pntsd, acllen, fattr); | 691 | rc = parse_sec_desc(pntsd, acllen, fattr); |
692 | if (rc) | 692 | if (rc) |
693 | cFYI(1, ("parse sec desc failed rc = %d", rc)); | 693 | cFYI(1, "parse sec desc failed rc = %d", rc); |
694 | 694 | ||
695 | kfree(pntsd); | 695 | kfree(pntsd); |
696 | return; | 696 | return; |
@@ -704,7 +704,7 @@ int mode_to_acl(struct inode *inode, const char *path, __u64 nmode) | |||
704 | struct cifs_ntsd *pntsd = NULL; /* acl obtained from server */ | 704 | struct cifs_ntsd *pntsd = NULL; /* acl obtained from server */ |
705 | struct cifs_ntsd *pnntsd = NULL; /* modified acl to be sent to server */ | 705 | struct cifs_ntsd *pnntsd = NULL; /* modified acl to be sent to server */ |
706 | 706 | ||
707 | cFYI(DBG2, ("set ACL from mode for %s", path)); | 707 | cFYI(DBG2, "set ACL from mode for %s", path); |
708 | 708 | ||
709 | /* Get the security descriptor */ | 709 | /* Get the security descriptor */ |
710 | pntsd = get_cifs_acl(CIFS_SB(inode->i_sb), inode, path, &secdesclen); | 710 | pntsd = get_cifs_acl(CIFS_SB(inode->i_sb), inode, path, &secdesclen); |
@@ -721,19 +721,19 @@ int mode_to_acl(struct inode *inode, const char *path, __u64 nmode) | |||
721 | DEFSECDESCLEN : secdesclen; | 721 | DEFSECDESCLEN : secdesclen; |
722 | pnntsd = kmalloc(secdesclen, GFP_KERNEL); | 722 | pnntsd = kmalloc(secdesclen, GFP_KERNEL); |
723 | if (!pnntsd) { | 723 | if (!pnntsd) { |
724 | cERROR(1, ("Unable to allocate security descriptor")); | 724 | cERROR(1, "Unable to allocate security descriptor"); |
725 | kfree(pntsd); | 725 | kfree(pntsd); |
726 | return -ENOMEM; | 726 | return -ENOMEM; |
727 | } | 727 | } |
728 | 728 | ||
729 | rc = build_sec_desc(pntsd, pnntsd, inode, nmode); | 729 | rc = build_sec_desc(pntsd, pnntsd, inode, nmode); |
730 | 730 | ||
731 | cFYI(DBG2, ("build_sec_desc rc: %d", rc)); | 731 | cFYI(DBG2, "build_sec_desc rc: %d", rc); |
732 | 732 | ||
733 | if (!rc) { | 733 | if (!rc) { |
734 | /* Set the security descriptor */ | 734 | /* Set the security descriptor */ |
735 | rc = set_cifs_acl(pnntsd, secdesclen, inode, path); | 735 | rc = set_cifs_acl(pnntsd, secdesclen, inode, path); |
736 | cFYI(DBG2, ("set_cifs_acl rc: %d", rc)); | 736 | cFYI(DBG2, "set_cifs_acl rc: %d", rc); |
737 | } | 737 | } |
738 | 738 | ||
739 | kfree(pnntsd); | 739 | kfree(pnntsd); |
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index fbe986430d0c..61e415252069 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
@@ -103,7 +103,7 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec, | |||
103 | if (iov[i].iov_len == 0) | 103 | if (iov[i].iov_len == 0) |
104 | continue; | 104 | continue; |
105 | if (iov[i].iov_base == NULL) { | 105 | if (iov[i].iov_base == NULL) { |
106 | cERROR(1, ("null iovec entry")); | 106 | cERROR(1, "null iovec entry"); |
107 | return -EIO; | 107 | return -EIO; |
108 | } | 108 | } |
109 | /* The first entry includes a length field (which does not get | 109 | /* The first entry includes a length field (which does not get |
@@ -181,8 +181,8 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu, | |||
181 | 181 | ||
182 | /* Do not need to verify session setups with signature "BSRSPYL " */ | 182 | /* Do not need to verify session setups with signature "BSRSPYL " */ |
183 | if (memcmp(cifs_pdu->Signature.SecuritySignature, "BSRSPYL ", 8) == 0) | 183 | if (memcmp(cifs_pdu->Signature.SecuritySignature, "BSRSPYL ", 8) == 0) |
184 | cFYI(1, ("dummy signature received for smb command 0x%x", | 184 | cFYI(1, "dummy signature received for smb command 0x%x", |
185 | cifs_pdu->Command)); | 185 | cifs_pdu->Command); |
186 | 186 | ||
187 | /* save off the origiginal signature so we can modify the smb and check | 187 | /* save off the origiginal signature so we can modify the smb and check |
188 | its signature against what the server sent */ | 188 | its signature against what the server sent */ |
@@ -398,7 +398,7 @@ void setup_ntlmv2_rsp(struct cifsSesInfo *ses, char *resp_buf, | |||
398 | /* calculate buf->ntlmv2_hash */ | 398 | /* calculate buf->ntlmv2_hash */ |
399 | rc = calc_ntlmv2_hash(ses, nls_cp); | 399 | rc = calc_ntlmv2_hash(ses, nls_cp); |
400 | if (rc) | 400 | if (rc) |
401 | cERROR(1, ("could not get v2 hash rc %d", rc)); | 401 | cERROR(1, "could not get v2 hash rc %d", rc); |
402 | CalcNTLMv2_response(ses, resp_buf); | 402 | CalcNTLMv2_response(ses, resp_buf); |
403 | 403 | ||
404 | /* now calculate the MAC key for NTLMv2 */ | 404 | /* now calculate the MAC key for NTLMv2 */ |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index ded66be6597c..53e794131c2a 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -128,8 +128,7 @@ cifs_read_super(struct super_block *sb, void *data, | |||
128 | 128 | ||
129 | if (rc) { | 129 | if (rc) { |
130 | if (!silent) | 130 | if (!silent) |
131 | cERROR(1, | 131 | cERROR(1, "cifs_mount failed w/return code = %d", rc); |
132 | ("cifs_mount failed w/return code = %d", rc)); | ||
133 | goto out_mount_failed; | 132 | goto out_mount_failed; |
134 | } | 133 | } |
135 | 134 | ||
@@ -160,7 +159,7 @@ cifs_read_super(struct super_block *sb, void *data, | |||
160 | 159 | ||
161 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 160 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
162 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 161 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { |
163 | cFYI(1, ("export ops supported")); | 162 | cFYI(1, "export ops supported"); |
164 | sb->s_export_op = &cifs_export_ops; | 163 | sb->s_export_op = &cifs_export_ops; |
165 | } | 164 | } |
166 | #endif /* EXPERIMENTAL */ | 165 | #endif /* EXPERIMENTAL */ |
@@ -168,7 +167,7 @@ cifs_read_super(struct super_block *sb, void *data, | |||
168 | return 0; | 167 | return 0; |
169 | 168 | ||
170 | out_no_root: | 169 | out_no_root: |
171 | cERROR(1, ("cifs_read_super: get root inode failed")); | 170 | cERROR(1, "cifs_read_super: get root inode failed"); |
172 | if (inode) | 171 | if (inode) |
173 | iput(inode); | 172 | iput(inode); |
174 | 173 | ||
@@ -194,10 +193,10 @@ cifs_put_super(struct super_block *sb) | |||
194 | int rc = 0; | 193 | int rc = 0; |
195 | struct cifs_sb_info *cifs_sb; | 194 | struct cifs_sb_info *cifs_sb; |
196 | 195 | ||
197 | cFYI(1, ("In cifs_put_super")); | 196 | cFYI(1, "In cifs_put_super"); |
198 | cifs_sb = CIFS_SB(sb); | 197 | cifs_sb = CIFS_SB(sb); |
199 | if (cifs_sb == NULL) { | 198 | if (cifs_sb == NULL) { |
200 | cFYI(1, ("Empty cifs superblock info passed to unmount")); | 199 | cFYI(1, "Empty cifs superblock info passed to unmount"); |
201 | return; | 200 | return; |
202 | } | 201 | } |
203 | 202 | ||
@@ -205,7 +204,7 @@ cifs_put_super(struct super_block *sb) | |||
205 | 204 | ||
206 | rc = cifs_umount(sb, cifs_sb); | 205 | rc = cifs_umount(sb, cifs_sb); |
207 | if (rc) | 206 | if (rc) |
208 | cERROR(1, ("cifs_umount failed with return code %d", rc)); | 207 | cERROR(1, "cifs_umount failed with return code %d", rc); |
209 | #ifdef CONFIG_CIFS_DFS_UPCALL | 208 | #ifdef CONFIG_CIFS_DFS_UPCALL |
210 | if (cifs_sb->mountdata) { | 209 | if (cifs_sb->mountdata) { |
211 | kfree(cifs_sb->mountdata); | 210 | kfree(cifs_sb->mountdata); |
@@ -439,7 +438,7 @@ int cifs_xquota_set(struct super_block *sb, int quota_type, qid_t qid, | |||
439 | 438 | ||
440 | xid = GetXid(); | 439 | xid = GetXid(); |
441 | if (pTcon) { | 440 | if (pTcon) { |
442 | cFYI(1, ("set type: 0x%x id: %d", quota_type, qid)); | 441 | cFYI(1, "set type: 0x%x id: %d", quota_type, qid); |
443 | } else | 442 | } else |
444 | rc = -EIO; | 443 | rc = -EIO; |
445 | 444 | ||
@@ -462,7 +461,7 @@ int cifs_xquota_get(struct super_block *sb, int quota_type, qid_t qid, | |||
462 | 461 | ||
463 | xid = GetXid(); | 462 | xid = GetXid(); |
464 | if (pTcon) { | 463 | if (pTcon) { |
465 | cFYI(1, ("set type: 0x%x id: %d", quota_type, qid)); | 464 | cFYI(1, "set type: 0x%x id: %d", quota_type, qid); |
466 | } else | 465 | } else |
467 | rc = -EIO; | 466 | rc = -EIO; |
468 | 467 | ||
@@ -484,7 +483,7 @@ int cifs_xstate_set(struct super_block *sb, unsigned int flags, int operation) | |||
484 | 483 | ||
485 | xid = GetXid(); | 484 | xid = GetXid(); |
486 | if (pTcon) { | 485 | if (pTcon) { |
487 | cFYI(1, ("flags: 0x%x operation: 0x%x", flags, operation)); | 486 | cFYI(1, "flags: 0x%x operation: 0x%x", flags, operation); |
488 | } else | 487 | } else |
489 | rc = -EIO; | 488 | rc = -EIO; |
490 | 489 | ||
@@ -506,7 +505,7 @@ int cifs_xstate_get(struct super_block *sb, struct fs_quota_stat *qstats) | |||
506 | 505 | ||
507 | xid = GetXid(); | 506 | xid = GetXid(); |
508 | if (pTcon) { | 507 | if (pTcon) { |
509 | cFYI(1, ("pqstats %p", qstats)); | 508 | cFYI(1, "pqstats %p", qstats); |
510 | } else | 509 | } else |
511 | rc = -EIO; | 510 | rc = -EIO; |
512 | 511 | ||
@@ -548,7 +547,7 @@ static void cifs_umount_begin(struct super_block *sb) | |||
548 | /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */ | 547 | /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */ |
549 | /* cancel_notify_requests(tcon); */ | 548 | /* cancel_notify_requests(tcon); */ |
550 | if (tcon->ses && tcon->ses->server) { | 549 | if (tcon->ses && tcon->ses->server) { |
551 | cFYI(1, ("wake up tasks now - umount begin not complete")); | 550 | cFYI(1, "wake up tasks now - umount begin not complete"); |
552 | wake_up_all(&tcon->ses->server->request_q); | 551 | wake_up_all(&tcon->ses->server->request_q); |
553 | wake_up_all(&tcon->ses->server->response_q); | 552 | wake_up_all(&tcon->ses->server->response_q); |
554 | msleep(1); /* yield */ | 553 | msleep(1); /* yield */ |
@@ -599,7 +598,7 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
599 | int rc; | 598 | int rc; |
600 | struct super_block *sb = sget(fs_type, NULL, set_anon_super, NULL); | 599 | struct super_block *sb = sget(fs_type, NULL, set_anon_super, NULL); |
601 | 600 | ||
602 | cFYI(1, ("Devname: %s flags: %d ", dev_name, flags)); | 601 | cFYI(1, "Devname: %s flags: %d ", dev_name, flags); |
603 | 602 | ||
604 | if (IS_ERR(sb)) | 603 | if (IS_ERR(sb)) |
605 | return PTR_ERR(sb); | 604 | return PTR_ERR(sb); |
@@ -868,7 +867,7 @@ cifs_init_request_bufs(void) | |||
868 | } else { | 867 | } else { |
869 | CIFSMaxBufSize &= 0x1FE00; /* Round size to even 512 byte mult*/ | 868 | CIFSMaxBufSize &= 0x1FE00; /* Round size to even 512 byte mult*/ |
870 | } | 869 | } |
871 | /* cERROR(1,("CIFSMaxBufSize %d 0x%x",CIFSMaxBufSize,CIFSMaxBufSize)); */ | 870 | /* cERROR(1, "CIFSMaxBufSize %d 0x%x",CIFSMaxBufSize,CIFSMaxBufSize); */ |
872 | cifs_req_cachep = kmem_cache_create("cifs_request", | 871 | cifs_req_cachep = kmem_cache_create("cifs_request", |
873 | CIFSMaxBufSize + | 872 | CIFSMaxBufSize + |
874 | MAX_CIFS_HDR_SIZE, 0, | 873 | MAX_CIFS_HDR_SIZE, 0, |
@@ -880,7 +879,7 @@ cifs_init_request_bufs(void) | |||
880 | cifs_min_rcv = 1; | 879 | cifs_min_rcv = 1; |
881 | else if (cifs_min_rcv > 64) { | 880 | else if (cifs_min_rcv > 64) { |
882 | cifs_min_rcv = 64; | 881 | cifs_min_rcv = 64; |
883 | cERROR(1, ("cifs_min_rcv set to maximum (64)")); | 882 | cERROR(1, "cifs_min_rcv set to maximum (64)"); |
884 | } | 883 | } |
885 | 884 | ||
886 | cifs_req_poolp = mempool_create_slab_pool(cifs_min_rcv, | 885 | cifs_req_poolp = mempool_create_slab_pool(cifs_min_rcv, |
@@ -911,7 +910,7 @@ cifs_init_request_bufs(void) | |||
911 | cifs_min_small = 2; | 910 | cifs_min_small = 2; |
912 | else if (cifs_min_small > 256) { | 911 | else if (cifs_min_small > 256) { |
913 | cifs_min_small = 256; | 912 | cifs_min_small = 256; |
914 | cFYI(1, ("cifs_min_small set to maximum (256)")); | 913 | cFYI(1, "cifs_min_small set to maximum (256)"); |
915 | } | 914 | } |
916 | 915 | ||
917 | cifs_sm_req_poolp = mempool_create_slab_pool(cifs_min_small, | 916 | cifs_sm_req_poolp = mempool_create_slab_pool(cifs_min_small, |
@@ -1009,10 +1008,10 @@ init_cifs(void) | |||
1009 | 1008 | ||
1010 | if (cifs_max_pending < 2) { | 1009 | if (cifs_max_pending < 2) { |
1011 | cifs_max_pending = 2; | 1010 | cifs_max_pending = 2; |
1012 | cFYI(1, ("cifs_max_pending set to min of 2")); | 1011 | cFYI(1, "cifs_max_pending set to min of 2"); |
1013 | } else if (cifs_max_pending > 256) { | 1012 | } else if (cifs_max_pending > 256) { |
1014 | cifs_max_pending = 256; | 1013 | cifs_max_pending = 256; |
1015 | cFYI(1, ("cifs_max_pending set to max of 256")); | 1014 | cFYI(1, "cifs_max_pending set to max of 256"); |
1016 | } | 1015 | } |
1017 | 1016 | ||
1018 | rc = cifs_init_inodecache(); | 1017 | rc = cifs_init_inodecache(); |
@@ -1070,7 +1069,7 @@ init_cifs(void) | |||
1070 | static void __exit | 1069 | static void __exit |
1071 | exit_cifs(void) | 1070 | exit_cifs(void) |
1072 | { | 1071 | { |
1073 | cFYI(DBG2, ("exit_cifs")); | 1072 | cFYI(DBG2, "exit_cifs"); |
1074 | cifs_proc_clean(); | 1073 | cifs_proc_clean(); |
1075 | #ifdef CONFIG_CIFS_DFS_UPCALL | 1074 | #ifdef CONFIG_CIFS_DFS_UPCALL |
1076 | cifs_dfs_release_automount_timer(); | 1075 | cifs_dfs_release_automount_timer(); |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 39e47f46dea5..32262e15be39 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -39,8 +39,20 @@ extern int smb_send(struct TCP_Server_Info *, struct smb_hdr *, | |||
39 | unsigned int /* length */); | 39 | unsigned int /* length */); |
40 | extern unsigned int _GetXid(void); | 40 | extern unsigned int _GetXid(void); |
41 | extern void _FreeXid(unsigned int); | 41 | extern void _FreeXid(unsigned int); |
42 | #define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current_fsuid())); | 42 | #define GetXid() \ |
43 | #define FreeXid(curr_xid) {_FreeXid(curr_xid); cFYI(1,("CIFS VFS: leaving %s (xid = %d) rc = %d",__func__,curr_xid,(int)rc));} | 43 | ({ \ |
44 | int __xid = (int)_GetXid(); \ | ||
45 | cFYI(1, "CIFS VFS: in %s as Xid: %d with uid: %d", \ | ||
46 | __func__, __xid, current_fsuid()); \ | ||
47 | __xid; \ | ||
48 | }) | ||
49 | |||
50 | #define FreeXid(curr_xid) \ | ||
51 | do { \ | ||
52 | _FreeXid(curr_xid); \ | ||
53 | cFYI(1, "CIFS VFS: leaving %s (xid = %d) rc = %d", \ | ||
54 | __func__, curr_xid, (int)rc); \ | ||
55 | } while (0) | ||
44 | extern char *build_path_from_dentry(struct dentry *); | 56 | extern char *build_path_from_dentry(struct dentry *); |
45 | extern char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb); | 57 | extern char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb); |
46 | extern char *build_wildcard_path_from_dentry(struct dentry *direntry); | 58 | extern char *build_wildcard_path_from_dentry(struct dentry *direntry); |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 5d3f29fef532..be23e426ffb3 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -130,8 +130,8 @@ cifs_reconnect_tcon(struct cifsTconInfo *tcon, int smb_command) | |||
130 | if (smb_command != SMB_COM_WRITE_ANDX && | 130 | if (smb_command != SMB_COM_WRITE_ANDX && |
131 | smb_command != SMB_COM_OPEN_ANDX && | 131 | smb_command != SMB_COM_OPEN_ANDX && |
132 | smb_command != SMB_COM_TREE_DISCONNECT) { | 132 | smb_command != SMB_COM_TREE_DISCONNECT) { |
133 | cFYI(1, ("can not send cmd %d while umounting", | 133 | cFYI(1, "can not send cmd %d while umounting", |
134 | smb_command)); | 134 | smb_command); |
135 | return -ENODEV; | 135 | return -ENODEV; |
136 | } | 136 | } |
137 | } | 137 | } |
@@ -157,7 +157,7 @@ cifs_reconnect_tcon(struct cifsTconInfo *tcon, int smb_command) | |||
157 | * back on-line | 157 | * back on-line |
158 | */ | 158 | */ |
159 | if (!tcon->retry || ses->status == CifsExiting) { | 159 | if (!tcon->retry || ses->status == CifsExiting) { |
160 | cFYI(1, ("gave up waiting on reconnect in smb_init")); | 160 | cFYI(1, "gave up waiting on reconnect in smb_init"); |
161 | return -EHOSTDOWN; | 161 | return -EHOSTDOWN; |
162 | } | 162 | } |
163 | } | 163 | } |
@@ -184,7 +184,7 @@ cifs_reconnect_tcon(struct cifsTconInfo *tcon, int smb_command) | |||
184 | mark_open_files_invalid(tcon); | 184 | mark_open_files_invalid(tcon); |
185 | rc = CIFSTCon(0, ses, tcon->treeName, tcon, nls_codepage); | 185 | rc = CIFSTCon(0, ses, tcon->treeName, tcon, nls_codepage); |
186 | mutex_unlock(&ses->session_mutex); | 186 | mutex_unlock(&ses->session_mutex); |
187 | cFYI(1, ("reconnect tcon rc = %d", rc)); | 187 | cFYI(1, "reconnect tcon rc = %d", rc); |
188 | 188 | ||
189 | if (rc) | 189 | if (rc) |
190 | goto out; | 190 | goto out; |
@@ -374,7 +374,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
374 | else /* if override flags set only sign/seal OR them with global auth */ | 374 | else /* if override flags set only sign/seal OR them with global auth */ |
375 | secFlags = extended_security | ses->overrideSecFlg; | 375 | secFlags = extended_security | ses->overrideSecFlg; |
376 | 376 | ||
377 | cFYI(1, ("secFlags 0x%x", secFlags)); | 377 | cFYI(1, "secFlags 0x%x", secFlags); |
378 | 378 | ||
379 | pSMB->hdr.Mid = GetNextMid(server); | 379 | pSMB->hdr.Mid = GetNextMid(server); |
380 | pSMB->hdr.Flags2 |= (SMBFLG2_UNICODE | SMBFLG2_ERR_STATUS); | 380 | pSMB->hdr.Flags2 |= (SMBFLG2_UNICODE | SMBFLG2_ERR_STATUS); |
@@ -382,14 +382,14 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
382 | if ((secFlags & CIFSSEC_MUST_KRB5) == CIFSSEC_MUST_KRB5) | 382 | if ((secFlags & CIFSSEC_MUST_KRB5) == CIFSSEC_MUST_KRB5) |
383 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; | 383 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; |
384 | else if ((secFlags & CIFSSEC_AUTH_MASK) == CIFSSEC_MAY_KRB5) { | 384 | else if ((secFlags & CIFSSEC_AUTH_MASK) == CIFSSEC_MAY_KRB5) { |
385 | cFYI(1, ("Kerberos only mechanism, enable extended security")); | 385 | cFYI(1, "Kerberos only mechanism, enable extended security"); |
386 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; | 386 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; |
387 | } | 387 | } |
388 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 388 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
389 | else if ((secFlags & CIFSSEC_MUST_NTLMSSP) == CIFSSEC_MUST_NTLMSSP) | 389 | else if ((secFlags & CIFSSEC_MUST_NTLMSSP) == CIFSSEC_MUST_NTLMSSP) |
390 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; | 390 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; |
391 | else if ((secFlags & CIFSSEC_AUTH_MASK) == CIFSSEC_MAY_NTLMSSP) { | 391 | else if ((secFlags & CIFSSEC_AUTH_MASK) == CIFSSEC_MAY_NTLMSSP) { |
392 | cFYI(1, ("NTLMSSP only mechanism, enable extended security")); | 392 | cFYI(1, "NTLMSSP only mechanism, enable extended security"); |
393 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; | 393 | pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; |
394 | } | 394 | } |
395 | #endif | 395 | #endif |
@@ -409,7 +409,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
409 | goto neg_err_exit; | 409 | goto neg_err_exit; |
410 | 410 | ||
411 | dialect = le16_to_cpu(pSMBr->DialectIndex); | 411 | dialect = le16_to_cpu(pSMBr->DialectIndex); |
412 | cFYI(1, ("Dialect: %d", dialect)); | 412 | cFYI(1, "Dialect: %d", dialect); |
413 | /* Check wct = 1 error case */ | 413 | /* Check wct = 1 error case */ |
414 | if ((pSMBr->hdr.WordCount < 13) || (dialect == BAD_PROT)) { | 414 | if ((pSMBr->hdr.WordCount < 13) || (dialect == BAD_PROT)) { |
415 | /* core returns wct = 1, but we do not ask for core - otherwise | 415 | /* core returns wct = 1, but we do not ask for core - otherwise |
@@ -428,8 +428,8 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
428 | (secFlags & CIFSSEC_MAY_PLNTXT)) | 428 | (secFlags & CIFSSEC_MAY_PLNTXT)) |
429 | server->secType = LANMAN; | 429 | server->secType = LANMAN; |
430 | else { | 430 | else { |
431 | cERROR(1, ("mount failed weak security disabled" | 431 | cERROR(1, "mount failed weak security disabled" |
432 | " in /proc/fs/cifs/SecurityFlags")); | 432 | " in /proc/fs/cifs/SecurityFlags"); |
433 | rc = -EOPNOTSUPP; | 433 | rc = -EOPNOTSUPP; |
434 | goto neg_err_exit; | 434 | goto neg_err_exit; |
435 | } | 435 | } |
@@ -462,9 +462,9 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
462 | utc = CURRENT_TIME; | 462 | utc = CURRENT_TIME; |
463 | ts = cnvrtDosUnixTm(rsp->SrvTime.Date, | 463 | ts = cnvrtDosUnixTm(rsp->SrvTime.Date, |
464 | rsp->SrvTime.Time, 0); | 464 | rsp->SrvTime.Time, 0); |
465 | cFYI(1, ("SrvTime %d sec since 1970 (utc: %d) diff: %d", | 465 | cFYI(1, "SrvTime %d sec since 1970 (utc: %d) diff: %d", |
466 | (int)ts.tv_sec, (int)utc.tv_sec, | 466 | (int)ts.tv_sec, (int)utc.tv_sec, |
467 | (int)(utc.tv_sec - ts.tv_sec))); | 467 | (int)(utc.tv_sec - ts.tv_sec)); |
468 | val = (int)(utc.tv_sec - ts.tv_sec); | 468 | val = (int)(utc.tv_sec - ts.tv_sec); |
469 | seconds = abs(val); | 469 | seconds = abs(val); |
470 | result = (seconds / MIN_TZ_ADJ) * MIN_TZ_ADJ; | 470 | result = (seconds / MIN_TZ_ADJ) * MIN_TZ_ADJ; |
@@ -478,7 +478,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
478 | server->timeAdj = (int)tmp; | 478 | server->timeAdj = (int)tmp; |
479 | server->timeAdj *= 60; /* also in seconds */ | 479 | server->timeAdj *= 60; /* also in seconds */ |
480 | } | 480 | } |
481 | cFYI(1, ("server->timeAdj: %d seconds", server->timeAdj)); | 481 | cFYI(1, "server->timeAdj: %d seconds", server->timeAdj); |
482 | 482 | ||
483 | 483 | ||
484 | /* BB get server time for time conversions and add | 484 | /* BB get server time for time conversions and add |
@@ -512,14 +512,14 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
512 | /* else wct == 17 NTLM */ | 512 | /* else wct == 17 NTLM */ |
513 | server->secMode = pSMBr->SecurityMode; | 513 | server->secMode = pSMBr->SecurityMode; |
514 | if ((server->secMode & SECMODE_USER) == 0) | 514 | if ((server->secMode & SECMODE_USER) == 0) |
515 | cFYI(1, ("share mode security")); | 515 | cFYI(1, "share mode security"); |
516 | 516 | ||
517 | if ((server->secMode & SECMODE_PW_ENCRYPT) == 0) | 517 | if ((server->secMode & SECMODE_PW_ENCRYPT) == 0) |
518 | #ifdef CONFIG_CIFS_WEAK_PW_HASH | 518 | #ifdef CONFIG_CIFS_WEAK_PW_HASH |
519 | if ((secFlags & CIFSSEC_MAY_PLNTXT) == 0) | 519 | if ((secFlags & CIFSSEC_MAY_PLNTXT) == 0) |
520 | #endif /* CIFS_WEAK_PW_HASH */ | 520 | #endif /* CIFS_WEAK_PW_HASH */ |
521 | cERROR(1, ("Server requests plain text password" | 521 | cERROR(1, "Server requests plain text password" |
522 | " but client support disabled")); | 522 | " but client support disabled"); |
523 | 523 | ||
524 | if ((secFlags & CIFSSEC_MUST_NTLMV2) == CIFSSEC_MUST_NTLMV2) | 524 | if ((secFlags & CIFSSEC_MUST_NTLMV2) == CIFSSEC_MUST_NTLMV2) |
525 | server->secType = NTLMv2; | 525 | server->secType = NTLMv2; |
@@ -539,7 +539,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
539 | #endif */ | 539 | #endif */ |
540 | else { | 540 | else { |
541 | rc = -EOPNOTSUPP; | 541 | rc = -EOPNOTSUPP; |
542 | cERROR(1, ("Invalid security type")); | 542 | cERROR(1, "Invalid security type"); |
543 | goto neg_err_exit; | 543 | goto neg_err_exit; |
544 | } | 544 | } |
545 | /* else ... any others ...? */ | 545 | /* else ... any others ...? */ |
@@ -551,7 +551,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
551 | server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize), | 551 | server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize), |
552 | (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); | 552 | (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); |
553 | server->max_rw = le32_to_cpu(pSMBr->MaxRawSize); | 553 | server->max_rw = le32_to_cpu(pSMBr->MaxRawSize); |
554 | cFYI(DBG2, ("Max buf = %d", ses->server->maxBuf)); | 554 | cFYI(DBG2, "Max buf = %d", ses->server->maxBuf); |
555 | GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey); | 555 | GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey); |
556 | server->capabilities = le32_to_cpu(pSMBr->Capabilities); | 556 | server->capabilities = le32_to_cpu(pSMBr->Capabilities); |
557 | server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone); | 557 | server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone); |
@@ -582,7 +582,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
582 | if (memcmp(server->server_GUID, | 582 | if (memcmp(server->server_GUID, |
583 | pSMBr->u.extended_response. | 583 | pSMBr->u.extended_response. |
584 | GUID, 16) != 0) { | 584 | GUID, 16) != 0) { |
585 | cFYI(1, ("server UID changed")); | 585 | cFYI(1, "server UID changed"); |
586 | memcpy(server->server_GUID, | 586 | memcpy(server->server_GUID, |
587 | pSMBr->u.extended_response.GUID, | 587 | pSMBr->u.extended_response.GUID, |
588 | 16); | 588 | 16); |
@@ -614,22 +614,21 @@ signing_check: | |||
614 | if ((secFlags & CIFSSEC_MAY_SIGN) == 0) { | 614 | if ((secFlags & CIFSSEC_MAY_SIGN) == 0) { |
615 | /* MUST_SIGN already includes the MAY_SIGN FLAG | 615 | /* MUST_SIGN already includes the MAY_SIGN FLAG |
616 | so if this is zero it means that signing is disabled */ | 616 | so if this is zero it means that signing is disabled */ |
617 | cFYI(1, ("Signing disabled")); | 617 | cFYI(1, "Signing disabled"); |
618 | if (server->secMode & SECMODE_SIGN_REQUIRED) { | 618 | if (server->secMode & SECMODE_SIGN_REQUIRED) { |
619 | cERROR(1, ("Server requires " | 619 | cERROR(1, "Server requires " |
620 | "packet signing to be enabled in " | 620 | "packet signing to be enabled in " |
621 | "/proc/fs/cifs/SecurityFlags.")); | 621 | "/proc/fs/cifs/SecurityFlags."); |
622 | rc = -EOPNOTSUPP; | 622 | rc = -EOPNOTSUPP; |
623 | } | 623 | } |
624 | server->secMode &= | 624 | server->secMode &= |
625 | ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); | 625 | ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); |
626 | } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { | 626 | } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { |
627 | /* signing required */ | 627 | /* signing required */ |
628 | cFYI(1, ("Must sign - secFlags 0x%x", secFlags)); | 628 | cFYI(1, "Must sign - secFlags 0x%x", secFlags); |
629 | if ((server->secMode & | 629 | if ((server->secMode & |
630 | (SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) { | 630 | (SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) { |
631 | cERROR(1, | 631 | cERROR(1, "signing required but server lacks support"); |
632 | ("signing required but server lacks support")); | ||
633 | rc = -EOPNOTSUPP; | 632 | rc = -EOPNOTSUPP; |
634 | } else | 633 | } else |
635 | server->secMode |= SECMODE_SIGN_REQUIRED; | 634 | server->secMode |= SECMODE_SIGN_REQUIRED; |
@@ -643,7 +642,7 @@ signing_check: | |||
643 | neg_err_exit: | 642 | neg_err_exit: |
644 | cifs_buf_release(pSMB); | 643 | cifs_buf_release(pSMB); |
645 | 644 | ||
646 | cFYI(1, ("negprot rc %d", rc)); | 645 | cFYI(1, "negprot rc %d", rc); |
647 | return rc; | 646 | return rc; |
648 | } | 647 | } |
649 | 648 | ||
@@ -653,7 +652,7 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) | |||
653 | struct smb_hdr *smb_buffer; | 652 | struct smb_hdr *smb_buffer; |
654 | int rc = 0; | 653 | int rc = 0; |
655 | 654 | ||
656 | cFYI(1, ("In tree disconnect")); | 655 | cFYI(1, "In tree disconnect"); |
657 | 656 | ||
658 | /* BB: do we need to check this? These should never be NULL. */ | 657 | /* BB: do we need to check this? These should never be NULL. */ |
659 | if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) | 658 | if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) |
@@ -675,7 +674,7 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) | |||
675 | 674 | ||
676 | rc = SendReceiveNoRsp(xid, tcon->ses, smb_buffer, 0); | 675 | rc = SendReceiveNoRsp(xid, tcon->ses, smb_buffer, 0); |
677 | if (rc) | 676 | if (rc) |
678 | cFYI(1, ("Tree disconnect failed %d", rc)); | 677 | cFYI(1, "Tree disconnect failed %d", rc); |
679 | 678 | ||
680 | /* No need to return error on this operation if tid invalidated and | 679 | /* No need to return error on this operation if tid invalidated and |
681 | closed on server already e.g. due to tcp session crashing */ | 680 | closed on server already e.g. due to tcp session crashing */ |
@@ -691,7 +690,7 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) | |||
691 | LOGOFF_ANDX_REQ *pSMB; | 690 | LOGOFF_ANDX_REQ *pSMB; |
692 | int rc = 0; | 691 | int rc = 0; |
693 | 692 | ||
694 | cFYI(1, ("In SMBLogoff for session disconnect")); | 693 | cFYI(1, "In SMBLogoff for session disconnect"); |
695 | 694 | ||
696 | /* | 695 | /* |
697 | * BB: do we need to check validity of ses and server? They should | 696 | * BB: do we need to check validity of ses and server? They should |
@@ -744,7 +743,7 @@ CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName, | |||
744 | int bytes_returned = 0; | 743 | int bytes_returned = 0; |
745 | __u16 params, param_offset, offset, byte_count; | 744 | __u16 params, param_offset, offset, byte_count; |
746 | 745 | ||
747 | cFYI(1, ("In POSIX delete")); | 746 | cFYI(1, "In POSIX delete"); |
748 | PsxDelete: | 747 | PsxDelete: |
749 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 748 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
750 | (void **) &pSMBr); | 749 | (void **) &pSMBr); |
@@ -796,7 +795,7 @@ PsxDelete: | |||
796 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 795 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
797 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 796 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
798 | if (rc) | 797 | if (rc) |
799 | cFYI(1, ("Posix delete returned %d", rc)); | 798 | cFYI(1, "Posix delete returned %d", rc); |
800 | cifs_buf_release(pSMB); | 799 | cifs_buf_release(pSMB); |
801 | 800 | ||
802 | cifs_stats_inc(&tcon->num_deletes); | 801 | cifs_stats_inc(&tcon->num_deletes); |
@@ -843,7 +842,7 @@ DelFileRetry: | |||
843 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 842 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
844 | cifs_stats_inc(&tcon->num_deletes); | 843 | cifs_stats_inc(&tcon->num_deletes); |
845 | if (rc) | 844 | if (rc) |
846 | cFYI(1, ("Error in RMFile = %d", rc)); | 845 | cFYI(1, "Error in RMFile = %d", rc); |
847 | 846 | ||
848 | cifs_buf_release(pSMB); | 847 | cifs_buf_release(pSMB); |
849 | if (rc == -EAGAIN) | 848 | if (rc == -EAGAIN) |
@@ -862,7 +861,7 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, const char *dirName, | |||
862 | int bytes_returned; | 861 | int bytes_returned; |
863 | int name_len; | 862 | int name_len; |
864 | 863 | ||
865 | cFYI(1, ("In CIFSSMBRmDir")); | 864 | cFYI(1, "In CIFSSMBRmDir"); |
866 | RmDirRetry: | 865 | RmDirRetry: |
867 | rc = smb_init(SMB_COM_DELETE_DIRECTORY, 0, tcon, (void **) &pSMB, | 866 | rc = smb_init(SMB_COM_DELETE_DIRECTORY, 0, tcon, (void **) &pSMB, |
868 | (void **) &pSMBr); | 867 | (void **) &pSMBr); |
@@ -887,7 +886,7 @@ RmDirRetry: | |||
887 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 886 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
888 | cifs_stats_inc(&tcon->num_rmdirs); | 887 | cifs_stats_inc(&tcon->num_rmdirs); |
889 | if (rc) | 888 | if (rc) |
890 | cFYI(1, ("Error in RMDir = %d", rc)); | 889 | cFYI(1, "Error in RMDir = %d", rc); |
891 | 890 | ||
892 | cifs_buf_release(pSMB); | 891 | cifs_buf_release(pSMB); |
893 | if (rc == -EAGAIN) | 892 | if (rc == -EAGAIN) |
@@ -905,7 +904,7 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, | |||
905 | int bytes_returned; | 904 | int bytes_returned; |
906 | int name_len; | 905 | int name_len; |
907 | 906 | ||
908 | cFYI(1, ("In CIFSSMBMkDir")); | 907 | cFYI(1, "In CIFSSMBMkDir"); |
909 | MkDirRetry: | 908 | MkDirRetry: |
910 | rc = smb_init(SMB_COM_CREATE_DIRECTORY, 0, tcon, (void **) &pSMB, | 909 | rc = smb_init(SMB_COM_CREATE_DIRECTORY, 0, tcon, (void **) &pSMB, |
911 | (void **) &pSMBr); | 910 | (void **) &pSMBr); |
@@ -930,7 +929,7 @@ MkDirRetry: | |||
930 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 929 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
931 | cifs_stats_inc(&tcon->num_mkdirs); | 930 | cifs_stats_inc(&tcon->num_mkdirs); |
932 | if (rc) | 931 | if (rc) |
933 | cFYI(1, ("Error in Mkdir = %d", rc)); | 932 | cFYI(1, "Error in Mkdir = %d", rc); |
934 | 933 | ||
935 | cifs_buf_release(pSMB); | 934 | cifs_buf_release(pSMB); |
936 | if (rc == -EAGAIN) | 935 | if (rc == -EAGAIN) |
@@ -953,7 +952,7 @@ CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, __u32 posix_flags, | |||
953 | OPEN_PSX_REQ *pdata; | 952 | OPEN_PSX_REQ *pdata; |
954 | OPEN_PSX_RSP *psx_rsp; | 953 | OPEN_PSX_RSP *psx_rsp; |
955 | 954 | ||
956 | cFYI(1, ("In POSIX Create")); | 955 | cFYI(1, "In POSIX Create"); |
957 | PsxCreat: | 956 | PsxCreat: |
958 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 957 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
959 | (void **) &pSMBr); | 958 | (void **) &pSMBr); |
@@ -1007,11 +1006,11 @@ PsxCreat: | |||
1007 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 1006 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
1008 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 1007 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
1009 | if (rc) { | 1008 | if (rc) { |
1010 | cFYI(1, ("Posix create returned %d", rc)); | 1009 | cFYI(1, "Posix create returned %d", rc); |
1011 | goto psx_create_err; | 1010 | goto psx_create_err; |
1012 | } | 1011 | } |
1013 | 1012 | ||
1014 | cFYI(1, ("copying inode info")); | 1013 | cFYI(1, "copying inode info"); |
1015 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 1014 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
1016 | 1015 | ||
1017 | if (rc || (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP))) { | 1016 | if (rc || (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP))) { |
@@ -1033,11 +1032,11 @@ PsxCreat: | |||
1033 | /* check to make sure response data is there */ | 1032 | /* check to make sure response data is there */ |
1034 | if (psx_rsp->ReturnedLevel != cpu_to_le16(SMB_QUERY_FILE_UNIX_BASIC)) { | 1033 | if (psx_rsp->ReturnedLevel != cpu_to_le16(SMB_QUERY_FILE_UNIX_BASIC)) { |
1035 | pRetData->Type = cpu_to_le32(-1); /* unknown */ | 1034 | pRetData->Type = cpu_to_le32(-1); /* unknown */ |
1036 | cFYI(DBG2, ("unknown type")); | 1035 | cFYI(DBG2, "unknown type"); |
1037 | } else { | 1036 | } else { |
1038 | if (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP) | 1037 | if (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP) |
1039 | + sizeof(FILE_UNIX_BASIC_INFO)) { | 1038 | + sizeof(FILE_UNIX_BASIC_INFO)) { |
1040 | cERROR(1, ("Open response data too small")); | 1039 | cERROR(1, "Open response data too small"); |
1041 | pRetData->Type = cpu_to_le32(-1); | 1040 | pRetData->Type = cpu_to_le32(-1); |
1042 | goto psx_create_err; | 1041 | goto psx_create_err; |
1043 | } | 1042 | } |
@@ -1084,7 +1083,7 @@ static __u16 convert_disposition(int disposition) | |||
1084 | ofun = SMBOPEN_OCREATE | SMBOPEN_OTRUNC; | 1083 | ofun = SMBOPEN_OCREATE | SMBOPEN_OTRUNC; |
1085 | break; | 1084 | break; |
1086 | default: | 1085 | default: |
1087 | cFYI(1, ("unknown disposition %d", disposition)); | 1086 | cFYI(1, "unknown disposition %d", disposition); |
1088 | ofun = SMBOPEN_OAPPEND; /* regular open */ | 1087 | ofun = SMBOPEN_OAPPEND; /* regular open */ |
1089 | } | 1088 | } |
1090 | return ofun; | 1089 | return ofun; |
@@ -1175,7 +1174,7 @@ OldOpenRetry: | |||
1175 | (struct smb_hdr *)pSMBr, &bytes_returned, CIFS_LONG_OP); | 1174 | (struct smb_hdr *)pSMBr, &bytes_returned, CIFS_LONG_OP); |
1176 | cifs_stats_inc(&tcon->num_opens); | 1175 | cifs_stats_inc(&tcon->num_opens); |
1177 | if (rc) { | 1176 | if (rc) { |
1178 | cFYI(1, ("Error in Open = %d", rc)); | 1177 | cFYI(1, "Error in Open = %d", rc); |
1179 | } else { | 1178 | } else { |
1180 | /* BB verify if wct == 15 */ | 1179 | /* BB verify if wct == 15 */ |
1181 | 1180 | ||
@@ -1288,7 +1287,7 @@ openRetry: | |||
1288 | (struct smb_hdr *)pSMBr, &bytes_returned, CIFS_LONG_OP); | 1287 | (struct smb_hdr *)pSMBr, &bytes_returned, CIFS_LONG_OP); |
1289 | cifs_stats_inc(&tcon->num_opens); | 1288 | cifs_stats_inc(&tcon->num_opens); |
1290 | if (rc) { | 1289 | if (rc) { |
1291 | cFYI(1, ("Error in Open = %d", rc)); | 1290 | cFYI(1, "Error in Open = %d", rc); |
1292 | } else { | 1291 | } else { |
1293 | *pOplock = pSMBr->OplockLevel; /* 1 byte no need to le_to_cpu */ | 1292 | *pOplock = pSMBr->OplockLevel; /* 1 byte no need to le_to_cpu */ |
1294 | *netfid = pSMBr->Fid; /* cifs fid stays in le */ | 1293 | *netfid = pSMBr->Fid; /* cifs fid stays in le */ |
@@ -1326,7 +1325,7 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, const int netfid, | |||
1326 | int resp_buf_type = 0; | 1325 | int resp_buf_type = 0; |
1327 | struct kvec iov[1]; | 1326 | struct kvec iov[1]; |
1328 | 1327 | ||
1329 | cFYI(1, ("Reading %d bytes on fid %d", count, netfid)); | 1328 | cFYI(1, "Reading %d bytes on fid %d", count, netfid); |
1330 | if (tcon->ses->capabilities & CAP_LARGE_FILES) | 1329 | if (tcon->ses->capabilities & CAP_LARGE_FILES) |
1331 | wct = 12; | 1330 | wct = 12; |
1332 | else { | 1331 | else { |
@@ -1371,7 +1370,7 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, const int netfid, | |||
1371 | cifs_stats_inc(&tcon->num_reads); | 1370 | cifs_stats_inc(&tcon->num_reads); |
1372 | pSMBr = (READ_RSP *)iov[0].iov_base; | 1371 | pSMBr = (READ_RSP *)iov[0].iov_base; |
1373 | if (rc) { | 1372 | if (rc) { |
1374 | cERROR(1, ("Send error in read = %d", rc)); | 1373 | cERROR(1, "Send error in read = %d", rc); |
1375 | } else { | 1374 | } else { |
1376 | int data_length = le16_to_cpu(pSMBr->DataLengthHigh); | 1375 | int data_length = le16_to_cpu(pSMBr->DataLengthHigh); |
1377 | data_length = data_length << 16; | 1376 | data_length = data_length << 16; |
@@ -1381,15 +1380,15 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, const int netfid, | |||
1381 | /*check that DataLength would not go beyond end of SMB */ | 1380 | /*check that DataLength would not go beyond end of SMB */ |
1382 | if ((data_length > CIFSMaxBufSize) | 1381 | if ((data_length > CIFSMaxBufSize) |
1383 | || (data_length > count)) { | 1382 | || (data_length > count)) { |
1384 | cFYI(1, ("bad length %d for count %d", | 1383 | cFYI(1, "bad length %d for count %d", |
1385 | data_length, count)); | 1384 | data_length, count); |
1386 | rc = -EIO; | 1385 | rc = -EIO; |
1387 | *nbytes = 0; | 1386 | *nbytes = 0; |
1388 | } else { | 1387 | } else { |
1389 | pReadData = (char *) (&pSMBr->hdr.Protocol) + | 1388 | pReadData = (char *) (&pSMBr->hdr.Protocol) + |
1390 | le16_to_cpu(pSMBr->DataOffset); | 1389 | le16_to_cpu(pSMBr->DataOffset); |
1391 | /* if (rc = copy_to_user(buf, pReadData, data_length)) { | 1390 | /* if (rc = copy_to_user(buf, pReadData, data_length)) { |
1392 | cERROR(1,("Faulting on read rc = %d",rc)); | 1391 | cERROR(1, "Faulting on read rc = %d",rc); |
1393 | rc = -EFAULT; | 1392 | rc = -EFAULT; |
1394 | }*/ /* can not use copy_to_user when using page cache*/ | 1393 | }*/ /* can not use copy_to_user when using page cache*/ |
1395 | if (*buf) | 1394 | if (*buf) |
@@ -1433,7 +1432,7 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon, | |||
1433 | 1432 | ||
1434 | *nbytes = 0; | 1433 | *nbytes = 0; |
1435 | 1434 | ||
1436 | /* cFYI(1, ("write at %lld %d bytes", offset, count));*/ | 1435 | /* cFYI(1, "write at %lld %d bytes", offset, count);*/ |
1437 | if (tcon->ses == NULL) | 1436 | if (tcon->ses == NULL) |
1438 | return -ECONNABORTED; | 1437 | return -ECONNABORTED; |
1439 | 1438 | ||
@@ -1551,7 +1550,7 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, | |||
1551 | 1550 | ||
1552 | *nbytes = 0; | 1551 | *nbytes = 0; |
1553 | 1552 | ||
1554 | cFYI(1, ("write2 at %lld %d bytes", (long long)offset, count)); | 1553 | cFYI(1, "write2 at %lld %d bytes", (long long)offset, count); |
1555 | 1554 | ||
1556 | if (tcon->ses->capabilities & CAP_LARGE_FILES) { | 1555 | if (tcon->ses->capabilities & CAP_LARGE_FILES) { |
1557 | wct = 14; | 1556 | wct = 14; |
@@ -1606,7 +1605,7 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, | |||
1606 | long_op); | 1605 | long_op); |
1607 | cifs_stats_inc(&tcon->num_writes); | 1606 | cifs_stats_inc(&tcon->num_writes); |
1608 | if (rc) { | 1607 | if (rc) { |
1609 | cFYI(1, ("Send error Write2 = %d", rc)); | 1608 | cFYI(1, "Send error Write2 = %d", rc); |
1610 | } else if (resp_buf_type == 0) { | 1609 | } else if (resp_buf_type == 0) { |
1611 | /* presumably this can not happen, but best to be safe */ | 1610 | /* presumably this can not happen, but best to be safe */ |
1612 | rc = -EIO; | 1611 | rc = -EIO; |
@@ -1651,7 +1650,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1651 | int timeout = 0; | 1650 | int timeout = 0; |
1652 | __u16 count; | 1651 | __u16 count; |
1653 | 1652 | ||
1654 | cFYI(1, ("CIFSSMBLock timeout %d numLock %d", (int)waitFlag, numLock)); | 1653 | cFYI(1, "CIFSSMBLock timeout %d numLock %d", (int)waitFlag, numLock); |
1655 | rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); | 1654 | rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); |
1656 | 1655 | ||
1657 | if (rc) | 1656 | if (rc) |
@@ -1699,7 +1698,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1699 | } | 1698 | } |
1700 | cifs_stats_inc(&tcon->num_locks); | 1699 | cifs_stats_inc(&tcon->num_locks); |
1701 | if (rc) | 1700 | if (rc) |
1702 | cFYI(1, ("Send error in Lock = %d", rc)); | 1701 | cFYI(1, "Send error in Lock = %d", rc); |
1703 | 1702 | ||
1704 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 1703 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
1705 | since file handle passed in no longer valid */ | 1704 | since file handle passed in no longer valid */ |
@@ -1722,7 +1721,7 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1722 | __u16 params, param_offset, offset, byte_count, count; | 1721 | __u16 params, param_offset, offset, byte_count, count; |
1723 | struct kvec iov[1]; | 1722 | struct kvec iov[1]; |
1724 | 1723 | ||
1725 | cFYI(1, ("Posix Lock")); | 1724 | cFYI(1, "Posix Lock"); |
1726 | 1725 | ||
1727 | if (pLockData == NULL) | 1726 | if (pLockData == NULL) |
1728 | return -EINVAL; | 1727 | return -EINVAL; |
@@ -1792,7 +1791,7 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1792 | } | 1791 | } |
1793 | 1792 | ||
1794 | if (rc) { | 1793 | if (rc) { |
1795 | cFYI(1, ("Send error in Posix Lock = %d", rc)); | 1794 | cFYI(1, "Send error in Posix Lock = %d", rc); |
1796 | } else if (get_flag) { | 1795 | } else if (get_flag) { |
1797 | /* lock structure can be returned on get */ | 1796 | /* lock structure can be returned on get */ |
1798 | __u16 data_offset; | 1797 | __u16 data_offset; |
@@ -1849,7 +1848,7 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) | |||
1849 | { | 1848 | { |
1850 | int rc = 0; | 1849 | int rc = 0; |
1851 | CLOSE_REQ *pSMB = NULL; | 1850 | CLOSE_REQ *pSMB = NULL; |
1852 | cFYI(1, ("In CIFSSMBClose")); | 1851 | cFYI(1, "In CIFSSMBClose"); |
1853 | 1852 | ||
1854 | /* do not retry on dead session on close */ | 1853 | /* do not retry on dead session on close */ |
1855 | rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB); | 1854 | rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB); |
@@ -1866,7 +1865,7 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) | |||
1866 | if (rc) { | 1865 | if (rc) { |
1867 | if (rc != -EINTR) { | 1866 | if (rc != -EINTR) { |
1868 | /* EINTR is expected when user ctl-c to kill app */ | 1867 | /* EINTR is expected when user ctl-c to kill app */ |
1869 | cERROR(1, ("Send error in Close = %d", rc)); | 1868 | cERROR(1, "Send error in Close = %d", rc); |
1870 | } | 1869 | } |
1871 | } | 1870 | } |
1872 | 1871 | ||
@@ -1882,7 +1881,7 @@ CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, int smb_file_id) | |||
1882 | { | 1881 | { |
1883 | int rc = 0; | 1882 | int rc = 0; |
1884 | FLUSH_REQ *pSMB = NULL; | 1883 | FLUSH_REQ *pSMB = NULL; |
1885 | cFYI(1, ("In CIFSSMBFlush")); | 1884 | cFYI(1, "In CIFSSMBFlush"); |
1886 | 1885 | ||
1887 | rc = small_smb_init(SMB_COM_FLUSH, 1, tcon, (void **) &pSMB); | 1886 | rc = small_smb_init(SMB_COM_FLUSH, 1, tcon, (void **) &pSMB); |
1888 | if (rc) | 1887 | if (rc) |
@@ -1893,7 +1892,7 @@ CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, int smb_file_id) | |||
1893 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); | 1892 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
1894 | cifs_stats_inc(&tcon->num_flushes); | 1893 | cifs_stats_inc(&tcon->num_flushes); |
1895 | if (rc) | 1894 | if (rc) |
1896 | cERROR(1, ("Send error in Flush = %d", rc)); | 1895 | cERROR(1, "Send error in Flush = %d", rc); |
1897 | 1896 | ||
1898 | return rc; | 1897 | return rc; |
1899 | } | 1898 | } |
@@ -1910,7 +1909,7 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, | |||
1910 | int name_len, name_len2; | 1909 | int name_len, name_len2; |
1911 | __u16 count; | 1910 | __u16 count; |
1912 | 1911 | ||
1913 | cFYI(1, ("In CIFSSMBRename")); | 1912 | cFYI(1, "In CIFSSMBRename"); |
1914 | renameRetry: | 1913 | renameRetry: |
1915 | rc = smb_init(SMB_COM_RENAME, 1, tcon, (void **) &pSMB, | 1914 | rc = smb_init(SMB_COM_RENAME, 1, tcon, (void **) &pSMB, |
1916 | (void **) &pSMBr); | 1915 | (void **) &pSMBr); |
@@ -1956,7 +1955,7 @@ renameRetry: | |||
1956 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 1955 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
1957 | cifs_stats_inc(&tcon->num_renames); | 1956 | cifs_stats_inc(&tcon->num_renames); |
1958 | if (rc) | 1957 | if (rc) |
1959 | cFYI(1, ("Send error in rename = %d", rc)); | 1958 | cFYI(1, "Send error in rename = %d", rc); |
1960 | 1959 | ||
1961 | cifs_buf_release(pSMB); | 1960 | cifs_buf_release(pSMB); |
1962 | 1961 | ||
@@ -1980,7 +1979,7 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon, | |||
1980 | int len_of_str; | 1979 | int len_of_str; |
1981 | __u16 params, param_offset, offset, count, byte_count; | 1980 | __u16 params, param_offset, offset, count, byte_count; |
1982 | 1981 | ||
1983 | cFYI(1, ("Rename to File by handle")); | 1982 | cFYI(1, "Rename to File by handle"); |
1984 | rc = smb_init(SMB_COM_TRANSACTION2, 15, pTcon, (void **) &pSMB, | 1983 | rc = smb_init(SMB_COM_TRANSACTION2, 15, pTcon, (void **) &pSMB, |
1985 | (void **) &pSMBr); | 1984 | (void **) &pSMBr); |
1986 | if (rc) | 1985 | if (rc) |
@@ -2035,7 +2034,7 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon, | |||
2035 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2034 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2036 | cifs_stats_inc(&pTcon->num_t2renames); | 2035 | cifs_stats_inc(&pTcon->num_t2renames); |
2037 | if (rc) | 2036 | if (rc) |
2038 | cFYI(1, ("Send error in Rename (by file handle) = %d", rc)); | 2037 | cFYI(1, "Send error in Rename (by file handle) = %d", rc); |
2039 | 2038 | ||
2040 | cifs_buf_release(pSMB); | 2039 | cifs_buf_release(pSMB); |
2041 | 2040 | ||
@@ -2057,7 +2056,7 @@ CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char *fromName, | |||
2057 | int name_len, name_len2; | 2056 | int name_len, name_len2; |
2058 | __u16 count; | 2057 | __u16 count; |
2059 | 2058 | ||
2060 | cFYI(1, ("In CIFSSMBCopy")); | 2059 | cFYI(1, "In CIFSSMBCopy"); |
2061 | copyRetry: | 2060 | copyRetry: |
2062 | rc = smb_init(SMB_COM_COPY, 1, tcon, (void **) &pSMB, | 2061 | rc = smb_init(SMB_COM_COPY, 1, tcon, (void **) &pSMB, |
2063 | (void **) &pSMBr); | 2062 | (void **) &pSMBr); |
@@ -2102,8 +2101,8 @@ copyRetry: | |||
2102 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 2101 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
2103 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2102 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2104 | if (rc) { | 2103 | if (rc) { |
2105 | cFYI(1, ("Send error in copy = %d with %d files copied", | 2104 | cFYI(1, "Send error in copy = %d with %d files copied", |
2106 | rc, le16_to_cpu(pSMBr->CopyCount))); | 2105 | rc, le16_to_cpu(pSMBr->CopyCount)); |
2107 | } | 2106 | } |
2108 | cifs_buf_release(pSMB); | 2107 | cifs_buf_release(pSMB); |
2109 | 2108 | ||
@@ -2127,7 +2126,7 @@ CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon, | |||
2127 | int bytes_returned = 0; | 2126 | int bytes_returned = 0; |
2128 | __u16 params, param_offset, offset, byte_count; | 2127 | __u16 params, param_offset, offset, byte_count; |
2129 | 2128 | ||
2130 | cFYI(1, ("In Symlink Unix style")); | 2129 | cFYI(1, "In Symlink Unix style"); |
2131 | createSymLinkRetry: | 2130 | createSymLinkRetry: |
2132 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 2131 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
2133 | (void **) &pSMBr); | 2132 | (void **) &pSMBr); |
@@ -2192,7 +2191,7 @@ createSymLinkRetry: | |||
2192 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2191 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2193 | cifs_stats_inc(&tcon->num_symlinks); | 2192 | cifs_stats_inc(&tcon->num_symlinks); |
2194 | if (rc) | 2193 | if (rc) |
2195 | cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc)); | 2194 | cFYI(1, "Send error in SetPathInfo create symlink = %d", rc); |
2196 | 2195 | ||
2197 | cifs_buf_release(pSMB); | 2196 | cifs_buf_release(pSMB); |
2198 | 2197 | ||
@@ -2216,7 +2215,7 @@ CIFSUnixCreateHardLink(const int xid, struct cifsTconInfo *tcon, | |||
2216 | int bytes_returned = 0; | 2215 | int bytes_returned = 0; |
2217 | __u16 params, param_offset, offset, byte_count; | 2216 | __u16 params, param_offset, offset, byte_count; |
2218 | 2217 | ||
2219 | cFYI(1, ("In Create Hard link Unix style")); | 2218 | cFYI(1, "In Create Hard link Unix style"); |
2220 | createHardLinkRetry: | 2219 | createHardLinkRetry: |
2221 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 2220 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
2222 | (void **) &pSMBr); | 2221 | (void **) &pSMBr); |
@@ -2278,7 +2277,7 @@ createHardLinkRetry: | |||
2278 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2277 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2279 | cifs_stats_inc(&tcon->num_hardlinks); | 2278 | cifs_stats_inc(&tcon->num_hardlinks); |
2280 | if (rc) | 2279 | if (rc) |
2281 | cFYI(1, ("Send error in SetPathInfo (hard link) = %d", rc)); | 2280 | cFYI(1, "Send error in SetPathInfo (hard link) = %d", rc); |
2282 | 2281 | ||
2283 | cifs_buf_release(pSMB); | 2282 | cifs_buf_release(pSMB); |
2284 | if (rc == -EAGAIN) | 2283 | if (rc == -EAGAIN) |
@@ -2299,7 +2298,7 @@ CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, | |||
2299 | int name_len, name_len2; | 2298 | int name_len, name_len2; |
2300 | __u16 count; | 2299 | __u16 count; |
2301 | 2300 | ||
2302 | cFYI(1, ("In CIFSCreateHardLink")); | 2301 | cFYI(1, "In CIFSCreateHardLink"); |
2303 | winCreateHardLinkRetry: | 2302 | winCreateHardLinkRetry: |
2304 | 2303 | ||
2305 | rc = smb_init(SMB_COM_NT_RENAME, 4, tcon, (void **) &pSMB, | 2304 | rc = smb_init(SMB_COM_NT_RENAME, 4, tcon, (void **) &pSMB, |
@@ -2350,7 +2349,7 @@ winCreateHardLinkRetry: | |||
2350 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2349 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2351 | cifs_stats_inc(&tcon->num_hardlinks); | 2350 | cifs_stats_inc(&tcon->num_hardlinks); |
2352 | if (rc) | 2351 | if (rc) |
2353 | cFYI(1, ("Send error in hard link (NT rename) = %d", rc)); | 2352 | cFYI(1, "Send error in hard link (NT rename) = %d", rc); |
2354 | 2353 | ||
2355 | cifs_buf_release(pSMB); | 2354 | cifs_buf_release(pSMB); |
2356 | if (rc == -EAGAIN) | 2355 | if (rc == -EAGAIN) |
@@ -2373,7 +2372,7 @@ CIFSSMBUnixQuerySymLink(const int xid, struct cifsTconInfo *tcon, | |||
2373 | __u16 params, byte_count; | 2372 | __u16 params, byte_count; |
2374 | char *data_start; | 2373 | char *data_start; |
2375 | 2374 | ||
2376 | cFYI(1, ("In QPathSymLinkInfo (Unix) for path %s", searchName)); | 2375 | cFYI(1, "In QPathSymLinkInfo (Unix) for path %s", searchName); |
2377 | 2376 | ||
2378 | querySymLinkRetry: | 2377 | querySymLinkRetry: |
2379 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 2378 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
@@ -2420,7 +2419,7 @@ querySymLinkRetry: | |||
2420 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 2419 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
2421 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2420 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2422 | if (rc) { | 2421 | if (rc) { |
2423 | cFYI(1, ("Send error in QuerySymLinkInfo = %d", rc)); | 2422 | cFYI(1, "Send error in QuerySymLinkInfo = %d", rc); |
2424 | } else { | 2423 | } else { |
2425 | /* decode response */ | 2424 | /* decode response */ |
2426 | 2425 | ||
@@ -2521,21 +2520,21 @@ validate_ntransact(char *buf, char **ppparm, char **ppdata, | |||
2521 | 2520 | ||
2522 | /* should we also check that parm and data areas do not overlap? */ | 2521 | /* should we also check that parm and data areas do not overlap? */ |
2523 | if (*ppparm > end_of_smb) { | 2522 | if (*ppparm > end_of_smb) { |
2524 | cFYI(1, ("parms start after end of smb")); | 2523 | cFYI(1, "parms start after end of smb"); |
2525 | return -EINVAL; | 2524 | return -EINVAL; |
2526 | } else if (parm_count + *ppparm > end_of_smb) { | 2525 | } else if (parm_count + *ppparm > end_of_smb) { |
2527 | cFYI(1, ("parm end after end of smb")); | 2526 | cFYI(1, "parm end after end of smb"); |
2528 | return -EINVAL; | 2527 | return -EINVAL; |
2529 | } else if (*ppdata > end_of_smb) { | 2528 | } else if (*ppdata > end_of_smb) { |
2530 | cFYI(1, ("data starts after end of smb")); | 2529 | cFYI(1, "data starts after end of smb"); |
2531 | return -EINVAL; | 2530 | return -EINVAL; |
2532 | } else if (data_count + *ppdata > end_of_smb) { | 2531 | } else if (data_count + *ppdata > end_of_smb) { |
2533 | cFYI(1, ("data %p + count %d (%p) ends after end of smb %p start %p", | 2532 | cFYI(1, "data %p + count %d (%p) ends after end of smb %p start %p", |
2534 | *ppdata, data_count, (data_count + *ppdata), | 2533 | *ppdata, data_count, (data_count + *ppdata), |
2535 | end_of_smb, pSMBr)); | 2534 | end_of_smb, pSMBr); |
2536 | return -EINVAL; | 2535 | return -EINVAL; |
2537 | } else if (parm_count + data_count > pSMBr->ByteCount) { | 2536 | } else if (parm_count + data_count > pSMBr->ByteCount) { |
2538 | cFYI(1, ("parm count and data count larger than SMB")); | 2537 | cFYI(1, "parm count and data count larger than SMB"); |
2539 | return -EINVAL; | 2538 | return -EINVAL; |
2540 | } | 2539 | } |
2541 | *pdatalen = data_count; | 2540 | *pdatalen = data_count; |
@@ -2554,7 +2553,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
2554 | struct smb_com_transaction_ioctl_req *pSMB; | 2553 | struct smb_com_transaction_ioctl_req *pSMB; |
2555 | struct smb_com_transaction_ioctl_rsp *pSMBr; | 2554 | struct smb_com_transaction_ioctl_rsp *pSMBr; |
2556 | 2555 | ||
2557 | cFYI(1, ("In Windows reparse style QueryLink for path %s", searchName)); | 2556 | cFYI(1, "In Windows reparse style QueryLink for path %s", searchName); |
2558 | rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, | 2557 | rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, |
2559 | (void **) &pSMBr); | 2558 | (void **) &pSMBr); |
2560 | if (rc) | 2559 | if (rc) |
@@ -2583,7 +2582,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
2583 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 2582 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
2584 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2583 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2585 | if (rc) { | 2584 | if (rc) { |
2586 | cFYI(1, ("Send error in QueryReparseLinkInfo = %d", rc)); | 2585 | cFYI(1, "Send error in QueryReparseLinkInfo = %d", rc); |
2587 | } else { /* decode response */ | 2586 | } else { /* decode response */ |
2588 | __u32 data_offset = le32_to_cpu(pSMBr->DataOffset); | 2587 | __u32 data_offset = le32_to_cpu(pSMBr->DataOffset); |
2589 | __u32 data_count = le32_to_cpu(pSMBr->DataCount); | 2588 | __u32 data_count = le32_to_cpu(pSMBr->DataCount); |
@@ -2607,7 +2606,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
2607 | if ((reparse_buf->LinkNamesBuf + | 2606 | if ((reparse_buf->LinkNamesBuf + |
2608 | reparse_buf->TargetNameOffset + | 2607 | reparse_buf->TargetNameOffset + |
2609 | reparse_buf->TargetNameLen) > end_of_smb) { | 2608 | reparse_buf->TargetNameLen) > end_of_smb) { |
2610 | cFYI(1, ("reparse buf beyond SMB")); | 2609 | cFYI(1, "reparse buf beyond SMB"); |
2611 | rc = -EIO; | 2610 | rc = -EIO; |
2612 | goto qreparse_out; | 2611 | goto qreparse_out; |
2613 | } | 2612 | } |
@@ -2628,12 +2627,12 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
2628 | } | 2627 | } |
2629 | } else { | 2628 | } else { |
2630 | rc = -EIO; | 2629 | rc = -EIO; |
2631 | cFYI(1, ("Invalid return data count on " | 2630 | cFYI(1, "Invalid return data count on " |
2632 | "get reparse info ioctl")); | 2631 | "get reparse info ioctl"); |
2633 | } | 2632 | } |
2634 | symlinkinfo[buflen] = 0; /* just in case so the caller | 2633 | symlinkinfo[buflen] = 0; /* just in case so the caller |
2635 | does not go off the end of the buffer */ | 2634 | does not go off the end of the buffer */ |
2636 | cFYI(1, ("readlink result - %s", symlinkinfo)); | 2635 | cFYI(1, "readlink result - %s", symlinkinfo); |
2637 | } | 2636 | } |
2638 | 2637 | ||
2639 | qreparse_out: | 2638 | qreparse_out: |
@@ -2656,7 +2655,7 @@ static void cifs_convert_ace(posix_acl_xattr_entry *ace, | |||
2656 | ace->e_perm = cpu_to_le16(cifs_ace->cifs_e_perm); | 2655 | ace->e_perm = cpu_to_le16(cifs_ace->cifs_e_perm); |
2657 | ace->e_tag = cpu_to_le16(cifs_ace->cifs_e_tag); | 2656 | ace->e_tag = cpu_to_le16(cifs_ace->cifs_e_tag); |
2658 | ace->e_id = cpu_to_le32(le64_to_cpu(cifs_ace->cifs_uid)); | 2657 | ace->e_id = cpu_to_le32(le64_to_cpu(cifs_ace->cifs_uid)); |
2659 | /* cFYI(1,("perm %d tag %d id %d",ace->e_perm,ace->e_tag,ace->e_id)); */ | 2658 | /* cFYI(1, "perm %d tag %d id %d",ace->e_perm,ace->e_tag,ace->e_id); */ |
2660 | 2659 | ||
2661 | return; | 2660 | return; |
2662 | } | 2661 | } |
@@ -2682,8 +2681,8 @@ static int cifs_copy_posix_acl(char *trgt, char *src, const int buflen, | |||
2682 | size += sizeof(struct cifs_posix_ace) * count; | 2681 | size += sizeof(struct cifs_posix_ace) * count; |
2683 | /* check if we would go beyond end of SMB */ | 2682 | /* check if we would go beyond end of SMB */ |
2684 | if (size_of_data_area < size) { | 2683 | if (size_of_data_area < size) { |
2685 | cFYI(1, ("bad CIFS POSIX ACL size %d vs. %d", | 2684 | cFYI(1, "bad CIFS POSIX ACL size %d vs. %d", |
2686 | size_of_data_area, size)); | 2685 | size_of_data_area, size); |
2687 | return -EINVAL; | 2686 | return -EINVAL; |
2688 | } | 2687 | } |
2689 | } else if (acl_type & ACL_TYPE_DEFAULT) { | 2688 | } else if (acl_type & ACL_TYPE_DEFAULT) { |
@@ -2730,7 +2729,7 @@ static __u16 convert_ace_to_cifs_ace(struct cifs_posix_ace *cifs_ace, | |||
2730 | cifs_ace->cifs_uid = cpu_to_le64(-1); | 2729 | cifs_ace->cifs_uid = cpu_to_le64(-1); |
2731 | } else | 2730 | } else |
2732 | cifs_ace->cifs_uid = cpu_to_le64(le32_to_cpu(local_ace->e_id)); | 2731 | cifs_ace->cifs_uid = cpu_to_le64(le32_to_cpu(local_ace->e_id)); |
2733 | /*cFYI(1,("perm %d tag %d id %d",ace->e_perm,ace->e_tag,ace->e_id));*/ | 2732 | /*cFYI(1, "perm %d tag %d id %d",ace->e_perm,ace->e_tag,ace->e_id);*/ |
2734 | return rc; | 2733 | return rc; |
2735 | } | 2734 | } |
2736 | 2735 | ||
@@ -2748,12 +2747,12 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL, | |||
2748 | return 0; | 2747 | return 0; |
2749 | 2748 | ||
2750 | count = posix_acl_xattr_count((size_t)buflen); | 2749 | count = posix_acl_xattr_count((size_t)buflen); |
2751 | cFYI(1, ("setting acl with %d entries from buf of length %d and " | 2750 | cFYI(1, "setting acl with %d entries from buf of length %d and " |
2752 | "version of %d", | 2751 | "version of %d", |
2753 | count, buflen, le32_to_cpu(local_acl->a_version))); | 2752 | count, buflen, le32_to_cpu(local_acl->a_version)); |
2754 | if (le32_to_cpu(local_acl->a_version) != 2) { | 2753 | if (le32_to_cpu(local_acl->a_version) != 2) { |
2755 | cFYI(1, ("unknown POSIX ACL version %d", | 2754 | cFYI(1, "unknown POSIX ACL version %d", |
2756 | le32_to_cpu(local_acl->a_version))); | 2755 | le32_to_cpu(local_acl->a_version)); |
2757 | return 0; | 2756 | return 0; |
2758 | } | 2757 | } |
2759 | cifs_acl->version = cpu_to_le16(1); | 2758 | cifs_acl->version = cpu_to_le16(1); |
@@ -2762,7 +2761,7 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL, | |||
2762 | else if (acl_type == ACL_TYPE_DEFAULT) | 2761 | else if (acl_type == ACL_TYPE_DEFAULT) |
2763 | cifs_acl->default_entry_count = cpu_to_le16(count); | 2762 | cifs_acl->default_entry_count = cpu_to_le16(count); |
2764 | else { | 2763 | else { |
2765 | cFYI(1, ("unknown ACL type %d", acl_type)); | 2764 | cFYI(1, "unknown ACL type %d", acl_type); |
2766 | return 0; | 2765 | return 0; |
2767 | } | 2766 | } |
2768 | for (i = 0; i < count; i++) { | 2767 | for (i = 0; i < count; i++) { |
@@ -2795,7 +2794,7 @@ CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, | |||
2795 | int name_len; | 2794 | int name_len; |
2796 | __u16 params, byte_count; | 2795 | __u16 params, byte_count; |
2797 | 2796 | ||
2798 | cFYI(1, ("In GetPosixACL (Unix) for path %s", searchName)); | 2797 | cFYI(1, "In GetPosixACL (Unix) for path %s", searchName); |
2799 | 2798 | ||
2800 | queryAclRetry: | 2799 | queryAclRetry: |
2801 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 2800 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
@@ -2847,7 +2846,7 @@ queryAclRetry: | |||
2847 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2846 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2848 | cifs_stats_inc(&tcon->num_acl_get); | 2847 | cifs_stats_inc(&tcon->num_acl_get); |
2849 | if (rc) { | 2848 | if (rc) { |
2850 | cFYI(1, ("Send error in Query POSIX ACL = %d", rc)); | 2849 | cFYI(1, "Send error in Query POSIX ACL = %d", rc); |
2851 | } else { | 2850 | } else { |
2852 | /* decode response */ | 2851 | /* decode response */ |
2853 | 2852 | ||
@@ -2884,7 +2883,7 @@ CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, | |||
2884 | int bytes_returned = 0; | 2883 | int bytes_returned = 0; |
2885 | __u16 params, byte_count, data_count, param_offset, offset; | 2884 | __u16 params, byte_count, data_count, param_offset, offset; |
2886 | 2885 | ||
2887 | cFYI(1, ("In SetPosixACL (Unix) for path %s", fileName)); | 2886 | cFYI(1, "In SetPosixACL (Unix) for path %s", fileName); |
2888 | setAclRetry: | 2887 | setAclRetry: |
2889 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 2888 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
2890 | (void **) &pSMBr); | 2889 | (void **) &pSMBr); |
@@ -2939,7 +2938,7 @@ setAclRetry: | |||
2939 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 2938 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
2940 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2939 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2941 | if (rc) | 2940 | if (rc) |
2942 | cFYI(1, ("Set POSIX ACL returned %d", rc)); | 2941 | cFYI(1, "Set POSIX ACL returned %d", rc); |
2943 | 2942 | ||
2944 | setACLerrorExit: | 2943 | setACLerrorExit: |
2945 | cifs_buf_release(pSMB); | 2944 | cifs_buf_release(pSMB); |
@@ -2959,7 +2958,7 @@ CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, | |||
2959 | int bytes_returned; | 2958 | int bytes_returned; |
2960 | __u16 params, byte_count; | 2959 | __u16 params, byte_count; |
2961 | 2960 | ||
2962 | cFYI(1, ("In GetExtAttr")); | 2961 | cFYI(1, "In GetExtAttr"); |
2963 | if (tcon == NULL) | 2962 | if (tcon == NULL) |
2964 | return -ENODEV; | 2963 | return -ENODEV; |
2965 | 2964 | ||
@@ -2998,7 +2997,7 @@ GetExtAttrRetry: | |||
2998 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 2997 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
2999 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2998 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
3000 | if (rc) { | 2999 | if (rc) { |
3001 | cFYI(1, ("error %d in GetExtAttr", rc)); | 3000 | cFYI(1, "error %d in GetExtAttr", rc); |
3002 | } else { | 3001 | } else { |
3003 | /* decode response */ | 3002 | /* decode response */ |
3004 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 3003 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
@@ -3013,7 +3012,7 @@ GetExtAttrRetry: | |||
3013 | struct file_chattr_info *pfinfo; | 3012 | struct file_chattr_info *pfinfo; |
3014 | /* BB Do we need a cast or hash here ? */ | 3013 | /* BB Do we need a cast or hash here ? */ |
3015 | if (count != 16) { | 3014 | if (count != 16) { |
3016 | cFYI(1, ("Illegal size ret in GetExtAttr")); | 3015 | cFYI(1, "Illegal size ret in GetExtAttr"); |
3017 | rc = -EIO; | 3016 | rc = -EIO; |
3018 | goto GetExtAttrOut; | 3017 | goto GetExtAttrOut; |
3019 | } | 3018 | } |
@@ -3043,7 +3042,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, | |||
3043 | QUERY_SEC_DESC_REQ *pSMB; | 3042 | QUERY_SEC_DESC_REQ *pSMB; |
3044 | struct kvec iov[1]; | 3043 | struct kvec iov[1]; |
3045 | 3044 | ||
3046 | cFYI(1, ("GetCifsACL")); | 3045 | cFYI(1, "GetCifsACL"); |
3047 | 3046 | ||
3048 | *pbuflen = 0; | 3047 | *pbuflen = 0; |
3049 | *acl_inf = NULL; | 3048 | *acl_inf = NULL; |
@@ -3068,7 +3067,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, | |||
3068 | CIFS_STD_OP); | 3067 | CIFS_STD_OP); |
3069 | cifs_stats_inc(&tcon->num_acl_get); | 3068 | cifs_stats_inc(&tcon->num_acl_get); |
3070 | if (rc) { | 3069 | if (rc) { |
3071 | cFYI(1, ("Send error in QuerySecDesc = %d", rc)); | 3070 | cFYI(1, "Send error in QuerySecDesc = %d", rc); |
3072 | } else { /* decode response */ | 3071 | } else { /* decode response */ |
3073 | __le32 *parm; | 3072 | __le32 *parm; |
3074 | __u32 parm_len; | 3073 | __u32 parm_len; |
@@ -3083,7 +3082,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, | |||
3083 | goto qsec_out; | 3082 | goto qsec_out; |
3084 | pSMBr = (struct smb_com_ntransact_rsp *)iov[0].iov_base; | 3083 | pSMBr = (struct smb_com_ntransact_rsp *)iov[0].iov_base; |
3085 | 3084 | ||
3086 | cFYI(1, ("smb %p parm %p data %p", pSMBr, parm, *acl_inf)); | 3085 | cFYI(1, "smb %p parm %p data %p", pSMBr, parm, *acl_inf); |
3087 | 3086 | ||
3088 | if (le32_to_cpu(pSMBr->ParameterCount) != 4) { | 3087 | if (le32_to_cpu(pSMBr->ParameterCount) != 4) { |
3089 | rc = -EIO; /* bad smb */ | 3088 | rc = -EIO; /* bad smb */ |
@@ -3095,8 +3094,8 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, | |||
3095 | 3094 | ||
3096 | acl_len = le32_to_cpu(*parm); | 3095 | acl_len = le32_to_cpu(*parm); |
3097 | if (acl_len != *pbuflen) { | 3096 | if (acl_len != *pbuflen) { |
3098 | cERROR(1, ("acl length %d does not match %d", | 3097 | cERROR(1, "acl length %d does not match %d", |
3099 | acl_len, *pbuflen)); | 3098 | acl_len, *pbuflen); |
3100 | if (*pbuflen > acl_len) | 3099 | if (*pbuflen > acl_len) |
3101 | *pbuflen = acl_len; | 3100 | *pbuflen = acl_len; |
3102 | } | 3101 | } |
@@ -3105,7 +3104,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, | |||
3105 | header followed by the smallest SID */ | 3104 | header followed by the smallest SID */ |
3106 | if ((*pbuflen < sizeof(struct cifs_ntsd) + 8) || | 3105 | if ((*pbuflen < sizeof(struct cifs_ntsd) + 8) || |
3107 | (*pbuflen >= 64 * 1024)) { | 3106 | (*pbuflen >= 64 * 1024)) { |
3108 | cERROR(1, ("bad acl length %d", *pbuflen)); | 3107 | cERROR(1, "bad acl length %d", *pbuflen); |
3109 | rc = -EINVAL; | 3108 | rc = -EINVAL; |
3110 | *pbuflen = 0; | 3109 | *pbuflen = 0; |
3111 | } else { | 3110 | } else { |
@@ -3179,9 +3178,9 @@ setCifsAclRetry: | |||
3179 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 3178 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
3180 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 3179 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
3181 | 3180 | ||
3182 | cFYI(1, ("SetCIFSACL bytes_returned: %d, rc: %d", bytes_returned, rc)); | 3181 | cFYI(1, "SetCIFSACL bytes_returned: %d, rc: %d", bytes_returned, rc); |
3183 | if (rc) | 3182 | if (rc) |
3184 | cFYI(1, ("Set CIFS ACL returned %d", rc)); | 3183 | cFYI(1, "Set CIFS ACL returned %d", rc); |
3185 | cifs_buf_release(pSMB); | 3184 | cifs_buf_release(pSMB); |
3186 | 3185 | ||
3187 | if (rc == -EAGAIN) | 3186 | if (rc == -EAGAIN) |
@@ -3205,7 +3204,7 @@ int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, | |||
3205 | int bytes_returned; | 3204 | int bytes_returned; |
3206 | int name_len; | 3205 | int name_len; |
3207 | 3206 | ||
3208 | cFYI(1, ("In SMBQPath path %s", searchName)); | 3207 | cFYI(1, "In SMBQPath path %s", searchName); |
3209 | QInfRetry: | 3208 | QInfRetry: |
3210 | rc = smb_init(SMB_COM_QUERY_INFORMATION, 0, tcon, (void **) &pSMB, | 3209 | rc = smb_init(SMB_COM_QUERY_INFORMATION, 0, tcon, (void **) &pSMB, |
3211 | (void **) &pSMBr); | 3210 | (void **) &pSMBr); |
@@ -3231,7 +3230,7 @@ QInfRetry: | |||
3231 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 3230 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
3232 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 3231 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
3233 | if (rc) { | 3232 | if (rc) { |
3234 | cFYI(1, ("Send error in QueryInfo = %d", rc)); | 3233 | cFYI(1, "Send error in QueryInfo = %d", rc); |
3235 | } else if (pFinfo) { | 3234 | } else if (pFinfo) { |
3236 | struct timespec ts; | 3235 | struct timespec ts; |
3237 | __u32 time = le32_to_cpu(pSMBr->last_write_time); | 3236 | __u32 time = le32_to_cpu(pSMBr->last_write_time); |
@@ -3343,7 +3342,7 @@ CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, | |||
3343 | int name_len; | 3342 | int name_len; |
3344 | __u16 params, byte_count; | 3343 | __u16 params, byte_count; |
3345 | 3344 | ||
3346 | /* cFYI(1, ("In QPathInfo path %s", searchName)); */ | 3345 | /* cFYI(1, "In QPathInfo path %s", searchName); */ |
3347 | QPathInfoRetry: | 3346 | QPathInfoRetry: |
3348 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 3347 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
3349 | (void **) &pSMBr); | 3348 | (void **) &pSMBr); |
@@ -3393,7 +3392,7 @@ QPathInfoRetry: | |||
3393 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 3392 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
3394 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 3393 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
3395 | if (rc) { | 3394 | if (rc) { |
3396 | cFYI(1, ("Send error in QPathInfo = %d", rc)); | 3395 | cFYI(1, "Send error in QPathInfo = %d", rc); |
3397 | } else { /* decode response */ | 3396 | } else { /* decode response */ |
3398 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 3397 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
3399 | 3398 | ||
@@ -3512,7 +3511,7 @@ CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon, | |||
3512 | int name_len; | 3511 | int name_len; |
3513 | __u16 params, byte_count; | 3512 | __u16 params, byte_count; |
3514 | 3513 | ||
3515 | cFYI(1, ("In QPathInfo (Unix) the path %s", searchName)); | 3514 | cFYI(1, "In QPathInfo (Unix) the path %s", searchName); |
3516 | UnixQPathInfoRetry: | 3515 | UnixQPathInfoRetry: |
3517 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 3516 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
3518 | (void **) &pSMBr); | 3517 | (void **) &pSMBr); |
@@ -3559,14 +3558,14 @@ UnixQPathInfoRetry: | |||
3559 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 3558 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
3560 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 3559 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
3561 | if (rc) { | 3560 | if (rc) { |
3562 | cFYI(1, ("Send error in QPathInfo = %d", rc)); | 3561 | cFYI(1, "Send error in QPathInfo = %d", rc); |
3563 | } else { /* decode response */ | 3562 | } else { /* decode response */ |
3564 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 3563 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
3565 | 3564 | ||
3566 | if (rc || (pSMBr->ByteCount < sizeof(FILE_UNIX_BASIC_INFO))) { | 3565 | if (rc || (pSMBr->ByteCount < sizeof(FILE_UNIX_BASIC_INFO))) { |
3567 | cERROR(1, ("Malformed FILE_UNIX_BASIC_INFO response.\n" | 3566 | cERROR(1, "Malformed FILE_UNIX_BASIC_INFO response.\n" |
3568 | "Unix Extensions can be disabled on mount " | 3567 | "Unix Extensions can be disabled on mount " |
3569 | "by specifying the nosfu mount option.")); | 3568 | "by specifying the nosfu mount option."); |
3570 | rc = -EIO; /* bad smb */ | 3569 | rc = -EIO; /* bad smb */ |
3571 | } else { | 3570 | } else { |
3572 | __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); | 3571 | __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); |
@@ -3600,7 +3599,7 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, | |||
3600 | int name_len; | 3599 | int name_len; |
3601 | __u16 params, byte_count; | 3600 | __u16 params, byte_count; |
3602 | 3601 | ||
3603 | cFYI(1, ("In FindFirst for %s", searchName)); | 3602 | cFYI(1, "In FindFirst for %s", searchName); |
3604 | 3603 | ||
3605 | findFirstRetry: | 3604 | findFirstRetry: |
3606 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 3605 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
@@ -3677,7 +3676,7 @@ findFirstRetry: | |||
3677 | if (rc) {/* BB add logic to retry regular search if Unix search | 3676 | if (rc) {/* BB add logic to retry regular search if Unix search |
3678 | rejected unexpectedly by server */ | 3677 | rejected unexpectedly by server */ |
3679 | /* BB Add code to handle unsupported level rc */ | 3678 | /* BB Add code to handle unsupported level rc */ |
3680 | cFYI(1, ("Error in FindFirst = %d", rc)); | 3679 | cFYI(1, "Error in FindFirst = %d", rc); |
3681 | 3680 | ||
3682 | cifs_buf_release(pSMB); | 3681 | cifs_buf_release(pSMB); |
3683 | 3682 | ||
@@ -3716,7 +3715,7 @@ findFirstRetry: | |||
3716 | lnoff = le16_to_cpu(parms->LastNameOffset); | 3715 | lnoff = le16_to_cpu(parms->LastNameOffset); |
3717 | if (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE < | 3716 | if (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE < |
3718 | lnoff) { | 3717 | lnoff) { |
3719 | cERROR(1, ("ignoring corrupt resume name")); | 3718 | cERROR(1, "ignoring corrupt resume name"); |
3720 | psrch_inf->last_entry = NULL; | 3719 | psrch_inf->last_entry = NULL; |
3721 | return rc; | 3720 | return rc; |
3722 | } | 3721 | } |
@@ -3744,7 +3743,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, | |||
3744 | int bytes_returned, name_len; | 3743 | int bytes_returned, name_len; |
3745 | __u16 params, byte_count; | 3744 | __u16 params, byte_count; |
3746 | 3745 | ||
3747 | cFYI(1, ("In FindNext")); | 3746 | cFYI(1, "In FindNext"); |
3748 | 3747 | ||
3749 | if (psrch_inf->endOfSearch) | 3748 | if (psrch_inf->endOfSearch) |
3750 | return -ENOENT; | 3749 | return -ENOENT; |
@@ -3808,7 +3807,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, | |||
3808 | cifs_buf_release(pSMB); | 3807 | cifs_buf_release(pSMB); |
3809 | rc = 0; /* search probably was closed at end of search*/ | 3808 | rc = 0; /* search probably was closed at end of search*/ |
3810 | } else | 3809 | } else |
3811 | cFYI(1, ("FindNext returned = %d", rc)); | 3810 | cFYI(1, "FindNext returned = %d", rc); |
3812 | } else { /* decode response */ | 3811 | } else { /* decode response */ |
3813 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 3812 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
3814 | 3813 | ||
@@ -3844,15 +3843,15 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, | |||
3844 | lnoff = le16_to_cpu(parms->LastNameOffset); | 3843 | lnoff = le16_to_cpu(parms->LastNameOffset); |
3845 | if (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE < | 3844 | if (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE < |
3846 | lnoff) { | 3845 | lnoff) { |
3847 | cERROR(1, ("ignoring corrupt resume name")); | 3846 | cERROR(1, "ignoring corrupt resume name"); |
3848 | psrch_inf->last_entry = NULL; | 3847 | psrch_inf->last_entry = NULL; |
3849 | return rc; | 3848 | return rc; |
3850 | } else | 3849 | } else |
3851 | psrch_inf->last_entry = | 3850 | psrch_inf->last_entry = |
3852 | psrch_inf->srch_entries_start + lnoff; | 3851 | psrch_inf->srch_entries_start + lnoff; |
3853 | 3852 | ||
3854 | /* cFYI(1,("fnxt2 entries in buf %d index_of_last %d", | 3853 | /* cFYI(1, "fnxt2 entries in buf %d index_of_last %d", |
3855 | psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry)); */ | 3854 | psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry); */ |
3856 | 3855 | ||
3857 | /* BB fixme add unlock here */ | 3856 | /* BB fixme add unlock here */ |
3858 | } | 3857 | } |
@@ -3877,7 +3876,7 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, | |||
3877 | int rc = 0; | 3876 | int rc = 0; |
3878 | FINDCLOSE_REQ *pSMB = NULL; | 3877 | FINDCLOSE_REQ *pSMB = NULL; |
3879 | 3878 | ||
3880 | cFYI(1, ("In CIFSSMBFindClose")); | 3879 | cFYI(1, "In CIFSSMBFindClose"); |
3881 | rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); | 3880 | rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); |
3882 | 3881 | ||
3883 | /* no sense returning error if session restarted | 3882 | /* no sense returning error if session restarted |
@@ -3891,7 +3890,7 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, | |||
3891 | pSMB->ByteCount = 0; | 3890 | pSMB->ByteCount = 0; |
3892 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); | 3891 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
3893 | if (rc) | 3892 | if (rc) |
3894 | cERROR(1, ("Send error in FindClose = %d", rc)); | 3893 | cERROR(1, "Send error in FindClose = %d", rc); |
3895 | 3894 | ||
3896 | cifs_stats_inc(&tcon->num_fclose); | 3895 | cifs_stats_inc(&tcon->num_fclose); |
3897 | 3896 | ||
@@ -3914,7 +3913,7 @@ CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, | |||
3914 | int name_len, bytes_returned; | 3913 | int name_len, bytes_returned; |
3915 | __u16 params, byte_count; | 3914 | __u16 params, byte_count; |
3916 | 3915 | ||
3917 | cFYI(1, ("In GetSrvInodeNum for %s", searchName)); | 3916 | cFYI(1, "In GetSrvInodeNum for %s", searchName); |
3918 | if (tcon == NULL) | 3917 | if (tcon == NULL) |
3919 | return -ENODEV; | 3918 | return -ENODEV; |
3920 | 3919 | ||
@@ -3964,7 +3963,7 @@ GetInodeNumberRetry: | |||
3964 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 3963 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
3965 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 3964 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
3966 | if (rc) { | 3965 | if (rc) { |
3967 | cFYI(1, ("error %d in QueryInternalInfo", rc)); | 3966 | cFYI(1, "error %d in QueryInternalInfo", rc); |
3968 | } else { | 3967 | } else { |
3969 | /* decode response */ | 3968 | /* decode response */ |
3970 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 3969 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
@@ -3979,7 +3978,7 @@ GetInodeNumberRetry: | |||
3979 | struct file_internal_info *pfinfo; | 3978 | struct file_internal_info *pfinfo; |
3980 | /* BB Do we need a cast or hash here ? */ | 3979 | /* BB Do we need a cast or hash here ? */ |
3981 | if (count < 8) { | 3980 | if (count < 8) { |
3982 | cFYI(1, ("Illegal size ret in QryIntrnlInf")); | 3981 | cFYI(1, "Illegal size ret in QryIntrnlInf"); |
3983 | rc = -EIO; | 3982 | rc = -EIO; |
3984 | goto GetInodeNumOut; | 3983 | goto GetInodeNumOut; |
3985 | } | 3984 | } |
@@ -4020,16 +4019,16 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, | |||
4020 | *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals); | 4019 | *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals); |
4021 | 4020 | ||
4022 | if (*num_of_nodes < 1) { | 4021 | if (*num_of_nodes < 1) { |
4023 | cERROR(1, ("num_referrals: must be at least > 0," | 4022 | cERROR(1, "num_referrals: must be at least > 0," |
4024 | "but we get num_referrals = %d\n", *num_of_nodes)); | 4023 | "but we get num_referrals = %d\n", *num_of_nodes); |
4025 | rc = -EINVAL; | 4024 | rc = -EINVAL; |
4026 | goto parse_DFS_referrals_exit; | 4025 | goto parse_DFS_referrals_exit; |
4027 | } | 4026 | } |
4028 | 4027 | ||
4029 | ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); | 4028 | ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); |
4030 | if (ref->VersionNumber != cpu_to_le16(3)) { | 4029 | if (ref->VersionNumber != cpu_to_le16(3)) { |
4031 | cERROR(1, ("Referrals of V%d version are not supported," | 4030 | cERROR(1, "Referrals of V%d version are not supported," |
4032 | "should be V3", le16_to_cpu(ref->VersionNumber))); | 4031 | "should be V3", le16_to_cpu(ref->VersionNumber)); |
4033 | rc = -EINVAL; | 4032 | rc = -EINVAL; |
4034 | goto parse_DFS_referrals_exit; | 4033 | goto parse_DFS_referrals_exit; |
4035 | } | 4034 | } |
@@ -4038,14 +4037,14 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, | |||
4038 | data_end = (char *)(&(pSMBr->PathConsumed)) + | 4037 | data_end = (char *)(&(pSMBr->PathConsumed)) + |
4039 | le16_to_cpu(pSMBr->t2.DataCount); | 4038 | le16_to_cpu(pSMBr->t2.DataCount); |
4040 | 4039 | ||
4041 | cFYI(1, ("num_referrals: %d dfs flags: 0x%x ... \n", | 4040 | cFYI(1, "num_referrals: %d dfs flags: 0x%x ... \n", |
4042 | *num_of_nodes, | 4041 | *num_of_nodes, |
4043 | le32_to_cpu(pSMBr->DFSFlags))); | 4042 | le32_to_cpu(pSMBr->DFSFlags)); |
4044 | 4043 | ||
4045 | *target_nodes = kzalloc(sizeof(struct dfs_info3_param) * | 4044 | *target_nodes = kzalloc(sizeof(struct dfs_info3_param) * |
4046 | *num_of_nodes, GFP_KERNEL); | 4045 | *num_of_nodes, GFP_KERNEL); |
4047 | if (*target_nodes == NULL) { | 4046 | if (*target_nodes == NULL) { |
4048 | cERROR(1, ("Failed to allocate buffer for target_nodes\n")); | 4047 | cERROR(1, "Failed to allocate buffer for target_nodes\n"); |
4049 | rc = -ENOMEM; | 4048 | rc = -ENOMEM; |
4050 | goto parse_DFS_referrals_exit; | 4049 | goto parse_DFS_referrals_exit; |
4051 | } | 4050 | } |
@@ -4121,7 +4120,7 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, | |||
4121 | *num_of_nodes = 0; | 4120 | *num_of_nodes = 0; |
4122 | *target_nodes = NULL; | 4121 | *target_nodes = NULL; |
4123 | 4122 | ||
4124 | cFYI(1, ("In GetDFSRefer the path %s", searchName)); | 4123 | cFYI(1, "In GetDFSRefer the path %s", searchName); |
4125 | if (ses == NULL) | 4124 | if (ses == NULL) |
4126 | return -ENODEV; | 4125 | return -ENODEV; |
4127 | getDFSRetry: | 4126 | getDFSRetry: |
@@ -4188,7 +4187,7 @@ getDFSRetry: | |||
4188 | rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, | 4187 | rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, |
4189 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4188 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4190 | if (rc) { | 4189 | if (rc) { |
4191 | cFYI(1, ("Send error in GetDFSRefer = %d", rc)); | 4190 | cFYI(1, "Send error in GetDFSRefer = %d", rc); |
4192 | goto GetDFSRefExit; | 4191 | goto GetDFSRefExit; |
4193 | } | 4192 | } |
4194 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4193 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
@@ -4199,9 +4198,9 @@ getDFSRetry: | |||
4199 | goto GetDFSRefExit; | 4198 | goto GetDFSRefExit; |
4200 | } | 4199 | } |
4201 | 4200 | ||
4202 | cFYI(1, ("Decoding GetDFSRefer response BCC: %d Offset %d", | 4201 | cFYI(1, "Decoding GetDFSRefer response BCC: %d Offset %d", |
4203 | pSMBr->ByteCount, | 4202 | pSMBr->ByteCount, |
4204 | le16_to_cpu(pSMBr->t2.DataOffset))); | 4203 | le16_to_cpu(pSMBr->t2.DataOffset)); |
4205 | 4204 | ||
4206 | /* parse returned result into more usable form */ | 4205 | /* parse returned result into more usable form */ |
4207 | rc = parse_DFS_referrals(pSMBr, num_of_nodes, | 4206 | rc = parse_DFS_referrals(pSMBr, num_of_nodes, |
@@ -4229,7 +4228,7 @@ SMBOldQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData) | |||
4229 | int bytes_returned = 0; | 4228 | int bytes_returned = 0; |
4230 | __u16 params, byte_count; | 4229 | __u16 params, byte_count; |
4231 | 4230 | ||
4232 | cFYI(1, ("OldQFSInfo")); | 4231 | cFYI(1, "OldQFSInfo"); |
4233 | oldQFSInfoRetry: | 4232 | oldQFSInfoRetry: |
4234 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4233 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
4235 | (void **) &pSMBr); | 4234 | (void **) &pSMBr); |
@@ -4262,7 +4261,7 @@ oldQFSInfoRetry: | |||
4262 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4261 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4263 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4262 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4264 | if (rc) { | 4263 | if (rc) { |
4265 | cFYI(1, ("Send error in QFSInfo = %d", rc)); | 4264 | cFYI(1, "Send error in QFSInfo = %d", rc); |
4266 | } else { /* decode response */ | 4265 | } else { /* decode response */ |
4267 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4266 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
4268 | 4267 | ||
@@ -4270,8 +4269,8 @@ oldQFSInfoRetry: | |||
4270 | rc = -EIO; /* bad smb */ | 4269 | rc = -EIO; /* bad smb */ |
4271 | else { | 4270 | else { |
4272 | __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); | 4271 | __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); |
4273 | cFYI(1, ("qfsinf resp BCC: %d Offset %d", | 4272 | cFYI(1, "qfsinf resp BCC: %d Offset %d", |
4274 | pSMBr->ByteCount, data_offset)); | 4273 | pSMBr->ByteCount, data_offset); |
4275 | 4274 | ||
4276 | response_data = (FILE_SYSTEM_ALLOC_INFO *) | 4275 | response_data = (FILE_SYSTEM_ALLOC_INFO *) |
4277 | (((char *) &pSMBr->hdr.Protocol) + data_offset); | 4276 | (((char *) &pSMBr->hdr.Protocol) + data_offset); |
@@ -4283,11 +4282,10 @@ oldQFSInfoRetry: | |||
4283 | le32_to_cpu(response_data->TotalAllocationUnits); | 4282 | le32_to_cpu(response_data->TotalAllocationUnits); |
4284 | FSData->f_bfree = FSData->f_bavail = | 4283 | FSData->f_bfree = FSData->f_bavail = |
4285 | le32_to_cpu(response_data->FreeAllocationUnits); | 4284 | le32_to_cpu(response_data->FreeAllocationUnits); |
4286 | cFYI(1, | 4285 | cFYI(1, "Blocks: %lld Free: %lld Block size %ld", |
4287 | ("Blocks: %lld Free: %lld Block size %ld", | 4286 | (unsigned long long)FSData->f_blocks, |
4288 | (unsigned long long)FSData->f_blocks, | 4287 | (unsigned long long)FSData->f_bfree, |
4289 | (unsigned long long)FSData->f_bfree, | 4288 | FSData->f_bsize); |
4290 | FSData->f_bsize)); | ||
4291 | } | 4289 | } |
4292 | } | 4290 | } |
4293 | cifs_buf_release(pSMB); | 4291 | cifs_buf_release(pSMB); |
@@ -4309,7 +4307,7 @@ CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData) | |||
4309 | int bytes_returned = 0; | 4307 | int bytes_returned = 0; |
4310 | __u16 params, byte_count; | 4308 | __u16 params, byte_count; |
4311 | 4309 | ||
4312 | cFYI(1, ("In QFSInfo")); | 4310 | cFYI(1, "In QFSInfo"); |
4313 | QFSInfoRetry: | 4311 | QFSInfoRetry: |
4314 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4312 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
4315 | (void **) &pSMBr); | 4313 | (void **) &pSMBr); |
@@ -4342,7 +4340,7 @@ QFSInfoRetry: | |||
4342 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4340 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4343 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4341 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4344 | if (rc) { | 4342 | if (rc) { |
4345 | cFYI(1, ("Send error in QFSInfo = %d", rc)); | 4343 | cFYI(1, "Send error in QFSInfo = %d", rc); |
4346 | } else { /* decode response */ | 4344 | } else { /* decode response */ |
4347 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4345 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
4348 | 4346 | ||
@@ -4363,11 +4361,10 @@ QFSInfoRetry: | |||
4363 | le64_to_cpu(response_data->TotalAllocationUnits); | 4361 | le64_to_cpu(response_data->TotalAllocationUnits); |
4364 | FSData->f_bfree = FSData->f_bavail = | 4362 | FSData->f_bfree = FSData->f_bavail = |
4365 | le64_to_cpu(response_data->FreeAllocationUnits); | 4363 | le64_to_cpu(response_data->FreeAllocationUnits); |
4366 | cFYI(1, | 4364 | cFYI(1, "Blocks: %lld Free: %lld Block size %ld", |
4367 | ("Blocks: %lld Free: %lld Block size %ld", | 4365 | (unsigned long long)FSData->f_blocks, |
4368 | (unsigned long long)FSData->f_blocks, | 4366 | (unsigned long long)FSData->f_bfree, |
4369 | (unsigned long long)FSData->f_bfree, | 4367 | FSData->f_bsize); |
4370 | FSData->f_bsize)); | ||
4371 | } | 4368 | } |
4372 | } | 4369 | } |
4373 | cifs_buf_release(pSMB); | 4370 | cifs_buf_release(pSMB); |
@@ -4389,7 +4386,7 @@ CIFSSMBQFSAttributeInfo(const int xid, struct cifsTconInfo *tcon) | |||
4389 | int bytes_returned = 0; | 4386 | int bytes_returned = 0; |
4390 | __u16 params, byte_count; | 4387 | __u16 params, byte_count; |
4391 | 4388 | ||
4392 | cFYI(1, ("In QFSAttributeInfo")); | 4389 | cFYI(1, "In QFSAttributeInfo"); |
4393 | QFSAttributeRetry: | 4390 | QFSAttributeRetry: |
4394 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4391 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
4395 | (void **) &pSMBr); | 4392 | (void **) &pSMBr); |
@@ -4423,7 +4420,7 @@ QFSAttributeRetry: | |||
4423 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4420 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4424 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4421 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4425 | if (rc) { | 4422 | if (rc) { |
4426 | cERROR(1, ("Send error in QFSAttributeInfo = %d", rc)); | 4423 | cERROR(1, "Send error in QFSAttributeInfo = %d", rc); |
4427 | } else { /* decode response */ | 4424 | } else { /* decode response */ |
4428 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4425 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
4429 | 4426 | ||
@@ -4459,7 +4456,7 @@ CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon) | |||
4459 | int bytes_returned = 0; | 4456 | int bytes_returned = 0; |
4460 | __u16 params, byte_count; | 4457 | __u16 params, byte_count; |
4461 | 4458 | ||
4462 | cFYI(1, ("In QFSDeviceInfo")); | 4459 | cFYI(1, "In QFSDeviceInfo"); |
4463 | QFSDeviceRetry: | 4460 | QFSDeviceRetry: |
4464 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4461 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
4465 | (void **) &pSMBr); | 4462 | (void **) &pSMBr); |
@@ -4494,7 +4491,7 @@ QFSDeviceRetry: | |||
4494 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4491 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4495 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4492 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4496 | if (rc) { | 4493 | if (rc) { |
4497 | cFYI(1, ("Send error in QFSDeviceInfo = %d", rc)); | 4494 | cFYI(1, "Send error in QFSDeviceInfo = %d", rc); |
4498 | } else { /* decode response */ | 4495 | } else { /* decode response */ |
4499 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4496 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
4500 | 4497 | ||
@@ -4529,7 +4526,7 @@ CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon) | |||
4529 | int bytes_returned = 0; | 4526 | int bytes_returned = 0; |
4530 | __u16 params, byte_count; | 4527 | __u16 params, byte_count; |
4531 | 4528 | ||
4532 | cFYI(1, ("In QFSUnixInfo")); | 4529 | cFYI(1, "In QFSUnixInfo"); |
4533 | QFSUnixRetry: | 4530 | QFSUnixRetry: |
4534 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4531 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
4535 | (void **) &pSMBr); | 4532 | (void **) &pSMBr); |
@@ -4563,7 +4560,7 @@ QFSUnixRetry: | |||
4563 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4560 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4564 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4561 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4565 | if (rc) { | 4562 | if (rc) { |
4566 | cERROR(1, ("Send error in QFSUnixInfo = %d", rc)); | 4563 | cERROR(1, "Send error in QFSUnixInfo = %d", rc); |
4567 | } else { /* decode response */ | 4564 | } else { /* decode response */ |
4568 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4565 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
4569 | 4566 | ||
@@ -4598,7 +4595,7 @@ CIFSSMBSetFSUnixInfo(const int xid, struct cifsTconInfo *tcon, __u64 cap) | |||
4598 | int bytes_returned = 0; | 4595 | int bytes_returned = 0; |
4599 | __u16 params, param_offset, offset, byte_count; | 4596 | __u16 params, param_offset, offset, byte_count; |
4600 | 4597 | ||
4601 | cFYI(1, ("In SETFSUnixInfo")); | 4598 | cFYI(1, "In SETFSUnixInfo"); |
4602 | SETFSUnixRetry: | 4599 | SETFSUnixRetry: |
4603 | /* BB switch to small buf init to save memory */ | 4600 | /* BB switch to small buf init to save memory */ |
4604 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4601 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
@@ -4646,7 +4643,7 @@ SETFSUnixRetry: | |||
4646 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4643 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4647 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4644 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4648 | if (rc) { | 4645 | if (rc) { |
4649 | cERROR(1, ("Send error in SETFSUnixInfo = %d", rc)); | 4646 | cERROR(1, "Send error in SETFSUnixInfo = %d", rc); |
4650 | } else { /* decode response */ | 4647 | } else { /* decode response */ |
4651 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4648 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
4652 | if (rc) | 4649 | if (rc) |
@@ -4674,7 +4671,7 @@ CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, | |||
4674 | int bytes_returned = 0; | 4671 | int bytes_returned = 0; |
4675 | __u16 params, byte_count; | 4672 | __u16 params, byte_count; |
4676 | 4673 | ||
4677 | cFYI(1, ("In QFSPosixInfo")); | 4674 | cFYI(1, "In QFSPosixInfo"); |
4678 | QFSPosixRetry: | 4675 | QFSPosixRetry: |
4679 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4676 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
4680 | (void **) &pSMBr); | 4677 | (void **) &pSMBr); |
@@ -4708,7 +4705,7 @@ QFSPosixRetry: | |||
4708 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4705 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4709 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4706 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4710 | if (rc) { | 4707 | if (rc) { |
4711 | cFYI(1, ("Send error in QFSUnixInfo = %d", rc)); | 4708 | cFYI(1, "Send error in QFSUnixInfo = %d", rc); |
4712 | } else { /* decode response */ | 4709 | } else { /* decode response */ |
4713 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4710 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
4714 | 4711 | ||
@@ -4768,7 +4765,7 @@ CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName, | |||
4768 | int bytes_returned = 0; | 4765 | int bytes_returned = 0; |
4769 | __u16 params, byte_count, data_count, param_offset, offset; | 4766 | __u16 params, byte_count, data_count, param_offset, offset; |
4770 | 4767 | ||
4771 | cFYI(1, ("In SetEOF")); | 4768 | cFYI(1, "In SetEOF"); |
4772 | SetEOFRetry: | 4769 | SetEOFRetry: |
4773 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 4770 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
4774 | (void **) &pSMBr); | 4771 | (void **) &pSMBr); |
@@ -4834,7 +4831,7 @@ SetEOFRetry: | |||
4834 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4831 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
4835 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4832 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
4836 | if (rc) | 4833 | if (rc) |
4837 | cFYI(1, ("SetPathInfo (file size) returned %d", rc)); | 4834 | cFYI(1, "SetPathInfo (file size) returned %d", rc); |
4838 | 4835 | ||
4839 | cifs_buf_release(pSMB); | 4836 | cifs_buf_release(pSMB); |
4840 | 4837 | ||
@@ -4854,8 +4851,8 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
4854 | int rc = 0; | 4851 | int rc = 0; |
4855 | __u16 params, param_offset, offset, byte_count, count; | 4852 | __u16 params, param_offset, offset, byte_count, count; |
4856 | 4853 | ||
4857 | cFYI(1, ("SetFileSize (via SetFileInfo) %lld", | 4854 | cFYI(1, "SetFileSize (via SetFileInfo) %lld", |
4858 | (long long)size)); | 4855 | (long long)size); |
4859 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); | 4856 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
4860 | 4857 | ||
4861 | if (rc) | 4858 | if (rc) |
@@ -4914,9 +4911,7 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
4914 | pSMB->ByteCount = cpu_to_le16(byte_count); | 4911 | pSMB->ByteCount = cpu_to_le16(byte_count); |
4915 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); | 4912 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
4916 | if (rc) { | 4913 | if (rc) { |
4917 | cFYI(1, | 4914 | cFYI(1, "Send error in SetFileInfo (SetFileSize) = %d", rc); |
4918 | ("Send error in SetFileInfo (SetFileSize) = %d", | ||
4919 | rc)); | ||
4920 | } | 4915 | } |
4921 | 4916 | ||
4922 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 4917 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
@@ -4940,7 +4935,7 @@ CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, | |||
4940 | int rc = 0; | 4935 | int rc = 0; |
4941 | __u16 params, param_offset, offset, byte_count, count; | 4936 | __u16 params, param_offset, offset, byte_count, count; |
4942 | 4937 | ||
4943 | cFYI(1, ("Set Times (via SetFileInfo)")); | 4938 | cFYI(1, "Set Times (via SetFileInfo)"); |
4944 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); | 4939 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
4945 | 4940 | ||
4946 | if (rc) | 4941 | if (rc) |
@@ -4985,7 +4980,7 @@ CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, | |||
4985 | memcpy(data_offset, data, sizeof(FILE_BASIC_INFO)); | 4980 | memcpy(data_offset, data, sizeof(FILE_BASIC_INFO)); |
4986 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); | 4981 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
4987 | if (rc) | 4982 | if (rc) |
4988 | cFYI(1, ("Send error in Set Time (SetFileInfo) = %d", rc)); | 4983 | cFYI(1, "Send error in Set Time (SetFileInfo) = %d", rc); |
4989 | 4984 | ||
4990 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 4985 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
4991 | since file handle passed in no longer valid */ | 4986 | since file handle passed in no longer valid */ |
@@ -5002,7 +4997,7 @@ CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon, | |||
5002 | int rc = 0; | 4997 | int rc = 0; |
5003 | __u16 params, param_offset, offset, byte_count, count; | 4998 | __u16 params, param_offset, offset, byte_count, count; |
5004 | 4999 | ||
5005 | cFYI(1, ("Set File Disposition (via SetFileInfo)")); | 5000 | cFYI(1, "Set File Disposition (via SetFileInfo)"); |
5006 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); | 5001 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
5007 | 5002 | ||
5008 | if (rc) | 5003 | if (rc) |
@@ -5044,7 +5039,7 @@ CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon, | |||
5044 | *data_offset = delete_file ? 1 : 0; | 5039 | *data_offset = delete_file ? 1 : 0; |
5045 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); | 5040 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
5046 | if (rc) | 5041 | if (rc) |
5047 | cFYI(1, ("Send error in SetFileDisposition = %d", rc)); | 5042 | cFYI(1, "Send error in SetFileDisposition = %d", rc); |
5048 | 5043 | ||
5049 | return rc; | 5044 | return rc; |
5050 | } | 5045 | } |
@@ -5062,7 +5057,7 @@ CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon, | |||
5062 | char *data_offset; | 5057 | char *data_offset; |
5063 | __u16 params, param_offset, offset, byte_count, count; | 5058 | __u16 params, param_offset, offset, byte_count, count; |
5064 | 5059 | ||
5065 | cFYI(1, ("In SetTimes")); | 5060 | cFYI(1, "In SetTimes"); |
5066 | 5061 | ||
5067 | SetTimesRetry: | 5062 | SetTimesRetry: |
5068 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 5063 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
@@ -5118,7 +5113,7 @@ SetTimesRetry: | |||
5118 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 5113 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
5119 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 5114 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
5120 | if (rc) | 5115 | if (rc) |
5121 | cFYI(1, ("SetPathInfo (times) returned %d", rc)); | 5116 | cFYI(1, "SetPathInfo (times) returned %d", rc); |
5122 | 5117 | ||
5123 | cifs_buf_release(pSMB); | 5118 | cifs_buf_release(pSMB); |
5124 | 5119 | ||
@@ -5143,7 +5138,7 @@ CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, char *fileName, | |||
5143 | int bytes_returned; | 5138 | int bytes_returned; |
5144 | int name_len; | 5139 | int name_len; |
5145 | 5140 | ||
5146 | cFYI(1, ("In SetAttrLegacy")); | 5141 | cFYI(1, "In SetAttrLegacy"); |
5147 | 5142 | ||
5148 | SetAttrLgcyRetry: | 5143 | SetAttrLgcyRetry: |
5149 | rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB, | 5144 | rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB, |
@@ -5169,7 +5164,7 @@ SetAttrLgcyRetry: | |||
5169 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 5164 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
5170 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 5165 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
5171 | if (rc) | 5166 | if (rc) |
5172 | cFYI(1, ("Error in LegacySetAttr = %d", rc)); | 5167 | cFYI(1, "Error in LegacySetAttr = %d", rc); |
5173 | 5168 | ||
5174 | cifs_buf_release(pSMB); | 5169 | cifs_buf_release(pSMB); |
5175 | 5170 | ||
@@ -5231,7 +5226,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon, | |||
5231 | int rc = 0; | 5226 | int rc = 0; |
5232 | u16 params, param_offset, offset, byte_count, count; | 5227 | u16 params, param_offset, offset, byte_count, count; |
5233 | 5228 | ||
5234 | cFYI(1, ("Set Unix Info (via SetFileInfo)")); | 5229 | cFYI(1, "Set Unix Info (via SetFileInfo)"); |
5235 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); | 5230 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
5236 | 5231 | ||
5237 | if (rc) | 5232 | if (rc) |
@@ -5276,7 +5271,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon, | |||
5276 | 5271 | ||
5277 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); | 5272 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
5278 | if (rc) | 5273 | if (rc) |
5279 | cFYI(1, ("Send error in Set Time (SetFileInfo) = %d", rc)); | 5274 | cFYI(1, "Send error in Set Time (SetFileInfo) = %d", rc); |
5280 | 5275 | ||
5281 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 5276 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
5282 | since file handle passed in no longer valid */ | 5277 | since file handle passed in no longer valid */ |
@@ -5297,7 +5292,7 @@ CIFSSMBUnixSetPathInfo(const int xid, struct cifsTconInfo *tcon, char *fileName, | |||
5297 | FILE_UNIX_BASIC_INFO *data_offset; | 5292 | FILE_UNIX_BASIC_INFO *data_offset; |
5298 | __u16 params, param_offset, offset, count, byte_count; | 5293 | __u16 params, param_offset, offset, count, byte_count; |
5299 | 5294 | ||
5300 | cFYI(1, ("In SetUID/GID/Mode")); | 5295 | cFYI(1, "In SetUID/GID/Mode"); |
5301 | setPermsRetry: | 5296 | setPermsRetry: |
5302 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 5297 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
5303 | (void **) &pSMBr); | 5298 | (void **) &pSMBr); |
@@ -5353,7 +5348,7 @@ setPermsRetry: | |||
5353 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 5348 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
5354 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 5349 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
5355 | if (rc) | 5350 | if (rc) |
5356 | cFYI(1, ("SetPathInfo (perms) returned %d", rc)); | 5351 | cFYI(1, "SetPathInfo (perms) returned %d", rc); |
5357 | 5352 | ||
5358 | cifs_buf_release(pSMB); | 5353 | cifs_buf_release(pSMB); |
5359 | if (rc == -EAGAIN) | 5354 | if (rc == -EAGAIN) |
@@ -5372,7 +5367,7 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, | |||
5372 | struct dir_notify_req *dnotify_req; | 5367 | struct dir_notify_req *dnotify_req; |
5373 | int bytes_returned; | 5368 | int bytes_returned; |
5374 | 5369 | ||
5375 | cFYI(1, ("In CIFSSMBNotify for file handle %d", (int)netfid)); | 5370 | cFYI(1, "In CIFSSMBNotify for file handle %d", (int)netfid); |
5376 | rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, | 5371 | rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, |
5377 | (void **) &pSMBr); | 5372 | (void **) &pSMBr); |
5378 | if (rc) | 5373 | if (rc) |
@@ -5406,7 +5401,7 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, | |||
5406 | (struct smb_hdr *)pSMBr, &bytes_returned, | 5401 | (struct smb_hdr *)pSMBr, &bytes_returned, |
5407 | CIFS_ASYNC_OP); | 5402 | CIFS_ASYNC_OP); |
5408 | if (rc) { | 5403 | if (rc) { |
5409 | cFYI(1, ("Error in Notify = %d", rc)); | 5404 | cFYI(1, "Error in Notify = %d", rc); |
5410 | } else { | 5405 | } else { |
5411 | /* Add file to outstanding requests */ | 5406 | /* Add file to outstanding requests */ |
5412 | /* BB change to kmem cache alloc */ | 5407 | /* BB change to kmem cache alloc */ |
@@ -5462,7 +5457,7 @@ CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, | |||
5462 | char *end_of_smb; | 5457 | char *end_of_smb; |
5463 | __u16 params, byte_count, data_offset; | 5458 | __u16 params, byte_count, data_offset; |
5464 | 5459 | ||
5465 | cFYI(1, ("In Query All EAs path %s", searchName)); | 5460 | cFYI(1, "In Query All EAs path %s", searchName); |
5466 | QAllEAsRetry: | 5461 | QAllEAsRetry: |
5467 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 5462 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
5468 | (void **) &pSMBr); | 5463 | (void **) &pSMBr); |
@@ -5509,7 +5504,7 @@ QAllEAsRetry: | |||
5509 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 5504 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
5510 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 5505 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
5511 | if (rc) { | 5506 | if (rc) { |
5512 | cFYI(1, ("Send error in QueryAllEAs = %d", rc)); | 5507 | cFYI(1, "Send error in QueryAllEAs = %d", rc); |
5513 | goto QAllEAsOut; | 5508 | goto QAllEAsOut; |
5514 | } | 5509 | } |
5515 | 5510 | ||
@@ -5537,16 +5532,16 @@ QAllEAsRetry: | |||
5537 | (((char *) &pSMBr->hdr.Protocol) + data_offset); | 5532 | (((char *) &pSMBr->hdr.Protocol) + data_offset); |
5538 | 5533 | ||
5539 | list_len = le32_to_cpu(ea_response_data->list_len); | 5534 | list_len = le32_to_cpu(ea_response_data->list_len); |
5540 | cFYI(1, ("ea length %d", list_len)); | 5535 | cFYI(1, "ea length %d", list_len); |
5541 | if (list_len <= 8) { | 5536 | if (list_len <= 8) { |
5542 | cFYI(1, ("empty EA list returned from server")); | 5537 | cFYI(1, "empty EA list returned from server"); |
5543 | goto QAllEAsOut; | 5538 | goto QAllEAsOut; |
5544 | } | 5539 | } |
5545 | 5540 | ||
5546 | /* make sure list_len doesn't go past end of SMB */ | 5541 | /* make sure list_len doesn't go past end of SMB */ |
5547 | end_of_smb = (char *)pByteArea(&pSMBr->hdr) + BCC(&pSMBr->hdr); | 5542 | end_of_smb = (char *)pByteArea(&pSMBr->hdr) + BCC(&pSMBr->hdr); |
5548 | if ((char *)ea_response_data + list_len > end_of_smb) { | 5543 | if ((char *)ea_response_data + list_len > end_of_smb) { |
5549 | cFYI(1, ("EA list appears to go beyond SMB")); | 5544 | cFYI(1, "EA list appears to go beyond SMB"); |
5550 | rc = -EIO; | 5545 | rc = -EIO; |
5551 | goto QAllEAsOut; | 5546 | goto QAllEAsOut; |
5552 | } | 5547 | } |
@@ -5563,7 +5558,7 @@ QAllEAsRetry: | |||
5563 | temp_ptr += 4; | 5558 | temp_ptr += 4; |
5564 | /* make sure we can read name_len and value_len */ | 5559 | /* make sure we can read name_len and value_len */ |
5565 | if (list_len < 0) { | 5560 | if (list_len < 0) { |
5566 | cFYI(1, ("EA entry goes beyond length of list")); | 5561 | cFYI(1, "EA entry goes beyond length of list"); |
5567 | rc = -EIO; | 5562 | rc = -EIO; |
5568 | goto QAllEAsOut; | 5563 | goto QAllEAsOut; |
5569 | } | 5564 | } |
@@ -5572,7 +5567,7 @@ QAllEAsRetry: | |||
5572 | value_len = le16_to_cpu(temp_fea->value_len); | 5567 | value_len = le16_to_cpu(temp_fea->value_len); |
5573 | list_len -= name_len + 1 + value_len; | 5568 | list_len -= name_len + 1 + value_len; |
5574 | if (list_len < 0) { | 5569 | if (list_len < 0) { |
5575 | cFYI(1, ("EA entry goes beyond length of list")); | 5570 | cFYI(1, "EA entry goes beyond length of list"); |
5576 | rc = -EIO; | 5571 | rc = -EIO; |
5577 | goto QAllEAsOut; | 5572 | goto QAllEAsOut; |
5578 | } | 5573 | } |
@@ -5639,7 +5634,7 @@ CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName, | |||
5639 | int bytes_returned = 0; | 5634 | int bytes_returned = 0; |
5640 | __u16 params, param_offset, byte_count, offset, count; | 5635 | __u16 params, param_offset, byte_count, offset, count; |
5641 | 5636 | ||
5642 | cFYI(1, ("In SetEA")); | 5637 | cFYI(1, "In SetEA"); |
5643 | SetEARetry: | 5638 | SetEARetry: |
5644 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 5639 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, |
5645 | (void **) &pSMBr); | 5640 | (void **) &pSMBr); |
@@ -5721,7 +5716,7 @@ SetEARetry: | |||
5721 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 5716 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
5722 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 5717 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
5723 | if (rc) | 5718 | if (rc) |
5724 | cFYI(1, ("SetPathInfo (EA) returned %d", rc)); | 5719 | cFYI(1, "SetPathInfo (EA) returned %d", rc); |
5725 | 5720 | ||
5726 | cifs_buf_release(pSMB); | 5721 | cifs_buf_release(pSMB); |
5727 | 5722 | ||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d9566bf8f917..58a2109e7b33 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -135,7 +135,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
135 | spin_unlock(&GlobalMid_Lock); | 135 | spin_unlock(&GlobalMid_Lock); |
136 | server->maxBuf = 0; | 136 | server->maxBuf = 0; |
137 | 137 | ||
138 | cFYI(1, ("Reconnecting tcp session")); | 138 | cFYI(1, "Reconnecting tcp session"); |
139 | 139 | ||
140 | /* before reconnecting the tcp session, mark the smb session (uid) | 140 | /* before reconnecting the tcp session, mark the smb session (uid) |
141 | and the tid bad so they are not used until reconnected */ | 141 | and the tid bad so they are not used until reconnected */ |
@@ -153,12 +153,12 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
153 | /* do not want to be sending data on a socket we are freeing */ | 153 | /* do not want to be sending data on a socket we are freeing */ |
154 | mutex_lock(&server->srv_mutex); | 154 | mutex_lock(&server->srv_mutex); |
155 | if (server->ssocket) { | 155 | if (server->ssocket) { |
156 | cFYI(1, ("State: 0x%x Flags: 0x%lx", server->ssocket->state, | 156 | cFYI(1, "State: 0x%x Flags: 0x%lx", server->ssocket->state, |
157 | server->ssocket->flags)); | 157 | server->ssocket->flags); |
158 | kernel_sock_shutdown(server->ssocket, SHUT_WR); | 158 | kernel_sock_shutdown(server->ssocket, SHUT_WR); |
159 | cFYI(1, ("Post shutdown state: 0x%x Flags: 0x%lx", | 159 | cFYI(1, "Post shutdown state: 0x%x Flags: 0x%lx", |
160 | server->ssocket->state, | 160 | server->ssocket->state, |
161 | server->ssocket->flags)); | 161 | server->ssocket->flags); |
162 | sock_release(server->ssocket); | 162 | sock_release(server->ssocket); |
163 | server->ssocket = NULL; | 163 | server->ssocket = NULL; |
164 | } | 164 | } |
@@ -187,7 +187,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
187 | else | 187 | else |
188 | rc = ipv4_connect(server); | 188 | rc = ipv4_connect(server); |
189 | if (rc) { | 189 | if (rc) { |
190 | cFYI(1, ("reconnect error %d", rc)); | 190 | cFYI(1, "reconnect error %d", rc); |
191 | msleep(3000); | 191 | msleep(3000); |
192 | } else { | 192 | } else { |
193 | atomic_inc(&tcpSesReconnectCount); | 193 | atomic_inc(&tcpSesReconnectCount); |
@@ -223,7 +223,7 @@ static int check2ndT2(struct smb_hdr *pSMB, unsigned int maxBufSize) | |||
223 | /* check for plausible wct, bcc and t2 data and parm sizes */ | 223 | /* check for plausible wct, bcc and t2 data and parm sizes */ |
224 | /* check for parm and data offset going beyond end of smb */ | 224 | /* check for parm and data offset going beyond end of smb */ |
225 | if (pSMB->WordCount != 10) { /* coalesce_t2 depends on this */ | 225 | if (pSMB->WordCount != 10) { /* coalesce_t2 depends on this */ |
226 | cFYI(1, ("invalid transact2 word count")); | 226 | cFYI(1, "invalid transact2 word count"); |
227 | return -EINVAL; | 227 | return -EINVAL; |
228 | } | 228 | } |
229 | 229 | ||
@@ -237,15 +237,15 @@ static int check2ndT2(struct smb_hdr *pSMB, unsigned int maxBufSize) | |||
237 | if (remaining == 0) | 237 | if (remaining == 0) |
238 | return 0; | 238 | return 0; |
239 | else if (remaining < 0) { | 239 | else if (remaining < 0) { |
240 | cFYI(1, ("total data %d smaller than data in frame %d", | 240 | cFYI(1, "total data %d smaller than data in frame %d", |
241 | total_data_size, data_in_this_rsp)); | 241 | total_data_size, data_in_this_rsp); |
242 | return -EINVAL; | 242 | return -EINVAL; |
243 | } else { | 243 | } else { |
244 | cFYI(1, ("missing %d bytes from transact2, check next response", | 244 | cFYI(1, "missing %d bytes from transact2, check next response", |
245 | remaining)); | 245 | remaining); |
246 | if (total_data_size > maxBufSize) { | 246 | if (total_data_size > maxBufSize) { |
247 | cERROR(1, ("TotalDataSize %d is over maximum buffer %d", | 247 | cERROR(1, "TotalDataSize %d is over maximum buffer %d", |
248 | total_data_size, maxBufSize)); | 248 | total_data_size, maxBufSize); |
249 | return -EINVAL; | 249 | return -EINVAL; |
250 | } | 250 | } |
251 | return remaining; | 251 | return remaining; |
@@ -267,7 +267,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | |||
267 | total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); | 267 | total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); |
268 | 268 | ||
269 | if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { | 269 | if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { |
270 | cFYI(1, ("total data size of primary and secondary t2 differ")); | 270 | cFYI(1, "total data size of primary and secondary t2 differ"); |
271 | } | 271 | } |
272 | 272 | ||
273 | total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); | 273 | total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); |
@@ -282,7 +282,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | |||
282 | 282 | ||
283 | total_in_buf2 = le16_to_cpu(pSMB2->t2_rsp.DataCount); | 283 | total_in_buf2 = le16_to_cpu(pSMB2->t2_rsp.DataCount); |
284 | if (remaining < total_in_buf2) { | 284 | if (remaining < total_in_buf2) { |
285 | cFYI(1, ("transact2 2nd response contains too much data")); | 285 | cFYI(1, "transact2 2nd response contains too much data"); |
286 | } | 286 | } |
287 | 287 | ||
288 | /* find end of first SMB data area */ | 288 | /* find end of first SMB data area */ |
@@ -311,7 +311,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) | |||
311 | pTargetSMB->smb_buf_length = byte_count; | 311 | pTargetSMB->smb_buf_length = byte_count; |
312 | 312 | ||
313 | if (remaining == total_in_buf2) { | 313 | if (remaining == total_in_buf2) { |
314 | cFYI(1, ("found the last secondary response")); | 314 | cFYI(1, "found the last secondary response"); |
315 | return 0; /* we are done */ | 315 | return 0; /* we are done */ |
316 | } else /* more responses to go */ | 316 | } else /* more responses to go */ |
317 | return 1; | 317 | return 1; |
@@ -339,7 +339,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
339 | int reconnect; | 339 | int reconnect; |
340 | 340 | ||
341 | current->flags |= PF_MEMALLOC; | 341 | current->flags |= PF_MEMALLOC; |
342 | cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current))); | 342 | cFYI(1, "Demultiplex PID: %d", task_pid_nr(current)); |
343 | 343 | ||
344 | length = atomic_inc_return(&tcpSesAllocCount); | 344 | length = atomic_inc_return(&tcpSesAllocCount); |
345 | if (length > 1) | 345 | if (length > 1) |
@@ -353,7 +353,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
353 | if (bigbuf == NULL) { | 353 | if (bigbuf == NULL) { |
354 | bigbuf = cifs_buf_get(); | 354 | bigbuf = cifs_buf_get(); |
355 | if (!bigbuf) { | 355 | if (!bigbuf) { |
356 | cERROR(1, ("No memory for large SMB response")); | 356 | cERROR(1, "No memory for large SMB response"); |
357 | msleep(3000); | 357 | msleep(3000); |
358 | /* retry will check if exiting */ | 358 | /* retry will check if exiting */ |
359 | continue; | 359 | continue; |
@@ -366,7 +366,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
366 | if (smallbuf == NULL) { | 366 | if (smallbuf == NULL) { |
367 | smallbuf = cifs_small_buf_get(); | 367 | smallbuf = cifs_small_buf_get(); |
368 | if (!smallbuf) { | 368 | if (!smallbuf) { |
369 | cERROR(1, ("No memory for SMB response")); | 369 | cERROR(1, "No memory for SMB response"); |
370 | msleep(1000); | 370 | msleep(1000); |
371 | /* retry will check if exiting */ | 371 | /* retry will check if exiting */ |
372 | continue; | 372 | continue; |
@@ -391,9 +391,9 @@ incomplete_rcv: | |||
391 | if (server->tcpStatus == CifsExiting) { | 391 | if (server->tcpStatus == CifsExiting) { |
392 | break; | 392 | break; |
393 | } else if (server->tcpStatus == CifsNeedReconnect) { | 393 | } else if (server->tcpStatus == CifsNeedReconnect) { |
394 | cFYI(1, ("Reconnect after server stopped responding")); | 394 | cFYI(1, "Reconnect after server stopped responding"); |
395 | cifs_reconnect(server); | 395 | cifs_reconnect(server); |
396 | cFYI(1, ("call to reconnect done")); | 396 | cFYI(1, "call to reconnect done"); |
397 | csocket = server->ssocket; | 397 | csocket = server->ssocket; |
398 | continue; | 398 | continue; |
399 | } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { | 399 | } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { |
@@ -411,7 +411,7 @@ incomplete_rcv: | |||
411 | continue; | 411 | continue; |
412 | } else if (length <= 0) { | 412 | } else if (length <= 0) { |
413 | if (server->tcpStatus == CifsNew) { | 413 | if (server->tcpStatus == CifsNew) { |
414 | cFYI(1, ("tcp session abend after SMBnegprot")); | 414 | cFYI(1, "tcp session abend after SMBnegprot"); |
415 | /* some servers kill the TCP session rather than | 415 | /* some servers kill the TCP session rather than |
416 | returning an SMB negprot error, in which | 416 | returning an SMB negprot error, in which |
417 | case reconnecting here is not going to help, | 417 | case reconnecting here is not going to help, |
@@ -419,18 +419,18 @@ incomplete_rcv: | |||
419 | break; | 419 | break; |
420 | } | 420 | } |
421 | if (!try_to_freeze() && (length == -EINTR)) { | 421 | if (!try_to_freeze() && (length == -EINTR)) { |
422 | cFYI(1, ("cifsd thread killed")); | 422 | cFYI(1, "cifsd thread killed"); |
423 | break; | 423 | break; |
424 | } | 424 | } |
425 | cFYI(1, ("Reconnect after unexpected peek error %d", | 425 | cFYI(1, "Reconnect after unexpected peek error %d", |
426 | length)); | 426 | length); |
427 | cifs_reconnect(server); | 427 | cifs_reconnect(server); |
428 | csocket = server->ssocket; | 428 | csocket = server->ssocket; |
429 | wake_up(&server->response_q); | 429 | wake_up(&server->response_q); |
430 | continue; | 430 | continue; |
431 | } else if (length < pdu_length) { | 431 | } else if (length < pdu_length) { |
432 | cFYI(1, ("requested %d bytes but only got %d bytes", | 432 | cFYI(1, "requested %d bytes but only got %d bytes", |
433 | pdu_length, length)); | 433 | pdu_length, length); |
434 | pdu_length -= length; | 434 | pdu_length -= length; |
435 | msleep(1); | 435 | msleep(1); |
436 | goto incomplete_rcv; | 436 | goto incomplete_rcv; |
@@ -450,18 +450,18 @@ incomplete_rcv: | |||
450 | pdu_length = be32_to_cpu((__force __be32)smb_buffer->smb_buf_length); | 450 | pdu_length = be32_to_cpu((__force __be32)smb_buffer->smb_buf_length); |
451 | smb_buffer->smb_buf_length = pdu_length; | 451 | smb_buffer->smb_buf_length = pdu_length; |
452 | 452 | ||
453 | cFYI(1, ("rfc1002 length 0x%x", pdu_length+4)); | 453 | cFYI(1, "rfc1002 length 0x%x", pdu_length+4); |
454 | 454 | ||
455 | if (temp == (char) RFC1002_SESSION_KEEP_ALIVE) { | 455 | if (temp == (char) RFC1002_SESSION_KEEP_ALIVE) { |
456 | continue; | 456 | continue; |
457 | } else if (temp == (char)RFC1002_POSITIVE_SESSION_RESPONSE) { | 457 | } else if (temp == (char)RFC1002_POSITIVE_SESSION_RESPONSE) { |
458 | cFYI(1, ("Good RFC 1002 session rsp")); | 458 | cFYI(1, "Good RFC 1002 session rsp"); |
459 | continue; | 459 | continue; |
460 | } else if (temp == (char)RFC1002_NEGATIVE_SESSION_RESPONSE) { | 460 | } else if (temp == (char)RFC1002_NEGATIVE_SESSION_RESPONSE) { |
461 | /* we get this from Windows 98 instead of | 461 | /* we get this from Windows 98 instead of |
462 | an error on SMB negprot response */ | 462 | an error on SMB negprot response */ |
463 | cFYI(1, ("Negative RFC1002 Session Response Error 0x%x)", | 463 | cFYI(1, "Negative RFC1002 Session Response Error 0x%x)", |
464 | pdu_length)); | 464 | pdu_length); |
465 | if (server->tcpStatus == CifsNew) { | 465 | if (server->tcpStatus == CifsNew) { |
466 | /* if nack on negprot (rather than | 466 | /* if nack on negprot (rather than |
467 | ret of smb negprot error) reconnecting | 467 | ret of smb negprot error) reconnecting |
@@ -484,7 +484,7 @@ incomplete_rcv: | |||
484 | continue; | 484 | continue; |
485 | } | 485 | } |
486 | } else if (temp != (char) 0) { | 486 | } else if (temp != (char) 0) { |
487 | cERROR(1, ("Unknown RFC 1002 frame")); | 487 | cERROR(1, "Unknown RFC 1002 frame"); |
488 | cifs_dump_mem(" Received Data: ", (char *)smb_buffer, | 488 | cifs_dump_mem(" Received Data: ", (char *)smb_buffer, |
489 | length); | 489 | length); |
490 | cifs_reconnect(server); | 490 | cifs_reconnect(server); |
@@ -495,8 +495,8 @@ incomplete_rcv: | |||
495 | /* else we have an SMB response */ | 495 | /* else we have an SMB response */ |
496 | if ((pdu_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) || | 496 | if ((pdu_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) || |
497 | (pdu_length < sizeof(struct smb_hdr) - 1 - 4)) { | 497 | (pdu_length < sizeof(struct smb_hdr) - 1 - 4)) { |
498 | cERROR(1, ("Invalid size SMB length %d pdu_length %d", | 498 | cERROR(1, "Invalid size SMB length %d pdu_length %d", |
499 | length, pdu_length+4)); | 499 | length, pdu_length+4); |
500 | cifs_reconnect(server); | 500 | cifs_reconnect(server); |
501 | csocket = server->ssocket; | 501 | csocket = server->ssocket; |
502 | wake_up(&server->response_q); | 502 | wake_up(&server->response_q); |
@@ -539,8 +539,8 @@ incomplete_rcv: | |||
539 | length = 0; | 539 | length = 0; |
540 | continue; | 540 | continue; |
541 | } else if (length <= 0) { | 541 | } else if (length <= 0) { |
542 | cERROR(1, ("Received no data, expecting %d", | 542 | cERROR(1, "Received no data, expecting %d", |
543 | pdu_length - total_read)); | 543 | pdu_length - total_read); |
544 | cifs_reconnect(server); | 544 | cifs_reconnect(server); |
545 | csocket = server->ssocket; | 545 | csocket = server->ssocket; |
546 | reconnect = 1; | 546 | reconnect = 1; |
@@ -588,7 +588,7 @@ incomplete_rcv: | |||
588 | } | 588 | } |
589 | } else { | 589 | } else { |
590 | if (!isLargeBuf) { | 590 | if (!isLargeBuf) { |
591 | cERROR(1,("1st trans2 resp needs bigbuf")); | 591 | cERROR(1, "1st trans2 resp needs bigbuf"); |
592 | /* BB maybe we can fix this up, switch | 592 | /* BB maybe we can fix this up, switch |
593 | to already allocated large buffer? */ | 593 | to already allocated large buffer? */ |
594 | } else { | 594 | } else { |
@@ -630,8 +630,8 @@ multi_t2_fnd: | |||
630 | wake_up_process(task_to_wake); | 630 | wake_up_process(task_to_wake); |
631 | } else if (!is_valid_oplock_break(smb_buffer, server) && | 631 | } else if (!is_valid_oplock_break(smb_buffer, server) && |
632 | !isMultiRsp) { | 632 | !isMultiRsp) { |
633 | cERROR(1, ("No task to wake, unknown frame received! " | 633 | cERROR(1, "No task to wake, unknown frame received! " |
634 | "NumMids %d", midCount.counter)); | 634 | "NumMids %d", midCount.counter); |
635 | cifs_dump_mem("Received Data is: ", (char *)smb_buffer, | 635 | cifs_dump_mem("Received Data is: ", (char *)smb_buffer, |
636 | sizeof(struct smb_hdr)); | 636 | sizeof(struct smb_hdr)); |
637 | #ifdef CONFIG_CIFS_DEBUG2 | 637 | #ifdef CONFIG_CIFS_DEBUG2 |
@@ -708,8 +708,8 @@ multi_t2_fnd: | |||
708 | list_for_each(tmp, &server->pending_mid_q) { | 708 | list_for_each(tmp, &server->pending_mid_q) { |
709 | mid_entry = list_entry(tmp, struct mid_q_entry, qhead); | 709 | mid_entry = list_entry(tmp, struct mid_q_entry, qhead); |
710 | if (mid_entry->midState == MID_REQUEST_SUBMITTED) { | 710 | if (mid_entry->midState == MID_REQUEST_SUBMITTED) { |
711 | cFYI(1, ("Clearing Mid 0x%x - waking up ", | 711 | cFYI(1, "Clearing Mid 0x%x - waking up ", |
712 | mid_entry->mid)); | 712 | mid_entry->mid); |
713 | task_to_wake = mid_entry->tsk; | 713 | task_to_wake = mid_entry->tsk; |
714 | if (task_to_wake) | 714 | if (task_to_wake) |
715 | wake_up_process(task_to_wake); | 715 | wake_up_process(task_to_wake); |
@@ -728,7 +728,7 @@ multi_t2_fnd: | |||
728 | to wait at least 45 seconds before giving up | 728 | to wait at least 45 seconds before giving up |
729 | on a request getting a response and going ahead | 729 | on a request getting a response and going ahead |
730 | and killing cifsd */ | 730 | and killing cifsd */ |
731 | cFYI(1, ("Wait for exit from demultiplex thread")); | 731 | cFYI(1, "Wait for exit from demultiplex thread"); |
732 | msleep(46000); | 732 | msleep(46000); |
733 | /* if threads still have not exited they are probably never | 733 | /* if threads still have not exited they are probably never |
734 | coming home not much else we can do but free the memory */ | 734 | coming home not much else we can do but free the memory */ |
@@ -849,7 +849,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
849 | separator[0] = options[4]; | 849 | separator[0] = options[4]; |
850 | options += 5; | 850 | options += 5; |
851 | } else { | 851 | } else { |
852 | cFYI(1, ("Null separator not allowed")); | 852 | cFYI(1, "Null separator not allowed"); |
853 | } | 853 | } |
854 | } | 854 | } |
855 | 855 | ||
@@ -974,7 +974,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
974 | } | 974 | } |
975 | } else if (strnicmp(data, "sec", 3) == 0) { | 975 | } else if (strnicmp(data, "sec", 3) == 0) { |
976 | if (!value || !*value) { | 976 | if (!value || !*value) { |
977 | cERROR(1, ("no security value specified")); | 977 | cERROR(1, "no security value specified"); |
978 | continue; | 978 | continue; |
979 | } else if (strnicmp(value, "krb5i", 5) == 0) { | 979 | } else if (strnicmp(value, "krb5i", 5) == 0) { |
980 | vol->secFlg |= CIFSSEC_MAY_KRB5 | | 980 | vol->secFlg |= CIFSSEC_MAY_KRB5 | |
@@ -982,7 +982,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
982 | } else if (strnicmp(value, "krb5p", 5) == 0) { | 982 | } else if (strnicmp(value, "krb5p", 5) == 0) { |
983 | /* vol->secFlg |= CIFSSEC_MUST_SEAL | | 983 | /* vol->secFlg |= CIFSSEC_MUST_SEAL | |
984 | CIFSSEC_MAY_KRB5; */ | 984 | CIFSSEC_MAY_KRB5; */ |
985 | cERROR(1, ("Krb5 cifs privacy not supported")); | 985 | cERROR(1, "Krb5 cifs privacy not supported"); |
986 | return 1; | 986 | return 1; |
987 | } else if (strnicmp(value, "krb5", 4) == 0) { | 987 | } else if (strnicmp(value, "krb5", 4) == 0) { |
988 | vol->secFlg |= CIFSSEC_MAY_KRB5; | 988 | vol->secFlg |= CIFSSEC_MAY_KRB5; |
@@ -1014,7 +1014,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1014 | } else if (strnicmp(value, "none", 4) == 0) { | 1014 | } else if (strnicmp(value, "none", 4) == 0) { |
1015 | vol->nullauth = 1; | 1015 | vol->nullauth = 1; |
1016 | } else { | 1016 | } else { |
1017 | cERROR(1, ("bad security option: %s", value)); | 1017 | cERROR(1, "bad security option: %s", value); |
1018 | return 1; | 1018 | return 1; |
1019 | } | 1019 | } |
1020 | } else if ((strnicmp(data, "unc", 3) == 0) | 1020 | } else if ((strnicmp(data, "unc", 3) == 0) |
@@ -1053,7 +1053,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1053 | a domain name and need special handling? */ | 1053 | a domain name and need special handling? */ |
1054 | if (strnlen(value, 256) < 256) { | 1054 | if (strnlen(value, 256) < 256) { |
1055 | vol->domainname = value; | 1055 | vol->domainname = value; |
1056 | cFYI(1, ("Domain name set")); | 1056 | cFYI(1, "Domain name set"); |
1057 | } else { | 1057 | } else { |
1058 | printk(KERN_WARNING "CIFS: domain name too " | 1058 | printk(KERN_WARNING "CIFS: domain name too " |
1059 | "long\n"); | 1059 | "long\n"); |
@@ -1076,7 +1076,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1076 | strcpy(vol->prepath+1, value); | 1076 | strcpy(vol->prepath+1, value); |
1077 | } else | 1077 | } else |
1078 | strcpy(vol->prepath, value); | 1078 | strcpy(vol->prepath, value); |
1079 | cFYI(1, ("prefix path %s", vol->prepath)); | 1079 | cFYI(1, "prefix path %s", vol->prepath); |
1080 | } else { | 1080 | } else { |
1081 | printk(KERN_WARNING "CIFS: prefix too long\n"); | 1081 | printk(KERN_WARNING "CIFS: prefix too long\n"); |
1082 | return 1; | 1082 | return 1; |
@@ -1092,7 +1092,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1092 | vol->iocharset = value; | 1092 | vol->iocharset = value; |
1093 | /* if iocharset not set then load_nls_default | 1093 | /* if iocharset not set then load_nls_default |
1094 | is used by caller */ | 1094 | is used by caller */ |
1095 | cFYI(1, ("iocharset set to %s", value)); | 1095 | cFYI(1, "iocharset set to %s", value); |
1096 | } else { | 1096 | } else { |
1097 | printk(KERN_WARNING "CIFS: iocharset name " | 1097 | printk(KERN_WARNING "CIFS: iocharset name " |
1098 | "too long.\n"); | 1098 | "too long.\n"); |
@@ -1144,14 +1144,14 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1144 | } | 1144 | } |
1145 | } else if (strnicmp(data, "sockopt", 5) == 0) { | 1145 | } else if (strnicmp(data, "sockopt", 5) == 0) { |
1146 | if (!value || !*value) { | 1146 | if (!value || !*value) { |
1147 | cERROR(1, ("no socket option specified")); | 1147 | cERROR(1, "no socket option specified"); |
1148 | continue; | 1148 | continue; |
1149 | } else if (strnicmp(value, "TCP_NODELAY", 11) == 0) { | 1149 | } else if (strnicmp(value, "TCP_NODELAY", 11) == 0) { |
1150 | vol->sockopt_tcp_nodelay = 1; | 1150 | vol->sockopt_tcp_nodelay = 1; |
1151 | } | 1151 | } |
1152 | } else if (strnicmp(data, "netbiosname", 4) == 0) { | 1152 | } else if (strnicmp(data, "netbiosname", 4) == 0) { |
1153 | if (!value || !*value || (*value == ' ')) { | 1153 | if (!value || !*value || (*value == ' ')) { |
1154 | cFYI(1, ("invalid (empty) netbiosname")); | 1154 | cFYI(1, "invalid (empty) netbiosname"); |
1155 | } else { | 1155 | } else { |
1156 | memset(vol->source_rfc1001_name, 0x20, 15); | 1156 | memset(vol->source_rfc1001_name, 0x20, 15); |
1157 | for (i = 0; i < 15; i++) { | 1157 | for (i = 0; i < 15; i++) { |
@@ -1175,7 +1175,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1175 | } else if (strnicmp(data, "servern", 7) == 0) { | 1175 | } else if (strnicmp(data, "servern", 7) == 0) { |
1176 | /* servernetbiosname specified override *SMBSERVER */ | 1176 | /* servernetbiosname specified override *SMBSERVER */ |
1177 | if (!value || !*value || (*value == ' ')) { | 1177 | if (!value || !*value || (*value == ' ')) { |
1178 | cFYI(1, ("empty server netbiosname specified")); | 1178 | cFYI(1, "empty server netbiosname specified"); |
1179 | } else { | 1179 | } else { |
1180 | /* last byte, type, is 0x20 for servr type */ | 1180 | /* last byte, type, is 0x20 for servr type */ |
1181 | memset(vol->target_rfc1001_name, 0x20, 16); | 1181 | memset(vol->target_rfc1001_name, 0x20, 16); |
@@ -1434,7 +1434,7 @@ cifs_find_tcp_session(struct sockaddr_storage *addr, unsigned short int port) | |||
1434 | 1434 | ||
1435 | ++server->srv_count; | 1435 | ++server->srv_count; |
1436 | write_unlock(&cifs_tcp_ses_lock); | 1436 | write_unlock(&cifs_tcp_ses_lock); |
1437 | cFYI(1, ("Existing tcp session with server found")); | 1437 | cFYI(1, "Existing tcp session with server found"); |
1438 | return server; | 1438 | return server; |
1439 | } | 1439 | } |
1440 | write_unlock(&cifs_tcp_ses_lock); | 1440 | write_unlock(&cifs_tcp_ses_lock); |
@@ -1475,7 +1475,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1475 | 1475 | ||
1476 | memset(&addr, 0, sizeof(struct sockaddr_storage)); | 1476 | memset(&addr, 0, sizeof(struct sockaddr_storage)); |
1477 | 1477 | ||
1478 | cFYI(1, ("UNC: %s ip: %s", volume_info->UNC, volume_info->UNCip)); | 1478 | cFYI(1, "UNC: %s ip: %s", volume_info->UNC, volume_info->UNCip); |
1479 | 1479 | ||
1480 | if (volume_info->UNCip && volume_info->UNC) { | 1480 | if (volume_info->UNCip && volume_info->UNC) { |
1481 | rc = cifs_convert_address(volume_info->UNCip, &addr); | 1481 | rc = cifs_convert_address(volume_info->UNCip, &addr); |
@@ -1487,13 +1487,12 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1487 | } else if (volume_info->UNCip) { | 1487 | } else if (volume_info->UNCip) { |
1488 | /* BB using ip addr as tcp_ses name to connect to the | 1488 | /* BB using ip addr as tcp_ses name to connect to the |
1489 | DFS root below */ | 1489 | DFS root below */ |
1490 | cERROR(1, ("Connecting to DFS root not implemented yet")); | 1490 | cERROR(1, "Connecting to DFS root not implemented yet"); |
1491 | rc = -EINVAL; | 1491 | rc = -EINVAL; |
1492 | goto out_err; | 1492 | goto out_err; |
1493 | } else /* which tcp_sess DFS root would we conect to */ { | 1493 | } else /* which tcp_sess DFS root would we conect to */ { |
1494 | cERROR(1, | 1494 | cERROR(1, "CIFS mount error: No UNC path (e.g. -o " |
1495 | ("CIFS mount error: No UNC path (e.g. -o " | 1495 | "unc=//192.168.1.100/public) specified"); |
1496 | "unc=//192.168.1.100/public) specified")); | ||
1497 | rc = -EINVAL; | 1496 | rc = -EINVAL; |
1498 | goto out_err; | 1497 | goto out_err; |
1499 | } | 1498 | } |
@@ -1540,7 +1539,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1540 | ++tcp_ses->srv_count; | 1539 | ++tcp_ses->srv_count; |
1541 | 1540 | ||
1542 | if (addr.ss_family == AF_INET6) { | 1541 | if (addr.ss_family == AF_INET6) { |
1543 | cFYI(1, ("attempting ipv6 connect")); | 1542 | cFYI(1, "attempting ipv6 connect"); |
1544 | /* BB should we allow ipv6 on port 139? */ | 1543 | /* BB should we allow ipv6 on port 139? */ |
1545 | /* other OS never observed in Wild doing 139 with v6 */ | 1544 | /* other OS never observed in Wild doing 139 with v6 */ |
1546 | sin_server6->sin6_port = htons(volume_info->port); | 1545 | sin_server6->sin6_port = htons(volume_info->port); |
@@ -1554,7 +1553,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1554 | rc = ipv4_connect(tcp_ses); | 1553 | rc = ipv4_connect(tcp_ses); |
1555 | } | 1554 | } |
1556 | if (rc < 0) { | 1555 | if (rc < 0) { |
1557 | cERROR(1, ("Error connecting to socket. Aborting operation")); | 1556 | cERROR(1, "Error connecting to socket. Aborting operation"); |
1558 | goto out_err; | 1557 | goto out_err; |
1559 | } | 1558 | } |
1560 | 1559 | ||
@@ -1567,7 +1566,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1567 | tcp_ses, "cifsd"); | 1566 | tcp_ses, "cifsd"); |
1568 | if (IS_ERR(tcp_ses->tsk)) { | 1567 | if (IS_ERR(tcp_ses->tsk)) { |
1569 | rc = PTR_ERR(tcp_ses->tsk); | 1568 | rc = PTR_ERR(tcp_ses->tsk); |
1570 | cERROR(1, ("error %d create cifsd thread", rc)); | 1569 | cERROR(1, "error %d create cifsd thread", rc); |
1571 | module_put(THIS_MODULE); | 1570 | module_put(THIS_MODULE); |
1572 | goto out_err; | 1571 | goto out_err; |
1573 | } | 1572 | } |
@@ -1703,8 +1702,7 @@ get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, | |||
1703 | strcpy(temp_unc + 2, pSesInfo->serverName); | 1702 | strcpy(temp_unc + 2, pSesInfo->serverName); |
1704 | strcpy(temp_unc + 2 + strlen(pSesInfo->serverName), "\\IPC$"); | 1703 | strcpy(temp_unc + 2 + strlen(pSesInfo->serverName), "\\IPC$"); |
1705 | rc = CIFSTCon(xid, pSesInfo, temp_unc, NULL, nls_codepage); | 1704 | rc = CIFSTCon(xid, pSesInfo, temp_unc, NULL, nls_codepage); |
1706 | cFYI(1, | 1705 | cFYI(1, "CIFS Tcon rc = %d ipc_tid = %d", rc, pSesInfo->ipc_tid); |
1707 | ("CIFS Tcon rc = %d ipc_tid = %d", rc, pSesInfo->ipc_tid)); | ||
1708 | kfree(temp_unc); | 1706 | kfree(temp_unc); |
1709 | } | 1707 | } |
1710 | if (rc == 0) | 1708 | if (rc == 0) |
@@ -1777,12 +1775,12 @@ ipv4_connect(struct TCP_Server_Info *server) | |||
1777 | rc = sock_create_kern(PF_INET, SOCK_STREAM, | 1775 | rc = sock_create_kern(PF_INET, SOCK_STREAM, |
1778 | IPPROTO_TCP, &socket); | 1776 | IPPROTO_TCP, &socket); |
1779 | if (rc < 0) { | 1777 | if (rc < 0) { |
1780 | cERROR(1, ("Error %d creating socket", rc)); | 1778 | cERROR(1, "Error %d creating socket", rc); |
1781 | return rc; | 1779 | return rc; |
1782 | } | 1780 | } |
1783 | 1781 | ||
1784 | /* BB other socket options to set KEEPALIVE, NODELAY? */ | 1782 | /* BB other socket options to set KEEPALIVE, NODELAY? */ |
1785 | cFYI(1, ("Socket created")); | 1783 | cFYI(1, "Socket created"); |
1786 | server->ssocket = socket; | 1784 | server->ssocket = socket; |
1787 | socket->sk->sk_allocation = GFP_NOFS; | 1785 | socket->sk->sk_allocation = GFP_NOFS; |
1788 | cifs_reclassify_socket4(socket); | 1786 | cifs_reclassify_socket4(socket); |
@@ -1827,7 +1825,7 @@ ipv4_connect(struct TCP_Server_Info *server) | |||
1827 | if (!connected) { | 1825 | if (!connected) { |
1828 | if (orig_port) | 1826 | if (orig_port) |
1829 | server->addr.sockAddr.sin_port = orig_port; | 1827 | server->addr.sockAddr.sin_port = orig_port; |
1830 | cFYI(1, ("Error %d connecting to server via ipv4", rc)); | 1828 | cFYI(1, "Error %d connecting to server via ipv4", rc); |
1831 | sock_release(socket); | 1829 | sock_release(socket); |
1832 | server->ssocket = NULL; | 1830 | server->ssocket = NULL; |
1833 | return rc; | 1831 | return rc; |
@@ -1855,12 +1853,12 @@ ipv4_connect(struct TCP_Server_Info *server) | |||
1855 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, | 1853 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, |
1856 | (char *)&val, sizeof(val)); | 1854 | (char *)&val, sizeof(val)); |
1857 | if (rc) | 1855 | if (rc) |
1858 | cFYI(1, ("set TCP_NODELAY socket option error %d", rc)); | 1856 | cFYI(1, "set TCP_NODELAY socket option error %d", rc); |
1859 | } | 1857 | } |
1860 | 1858 | ||
1861 | cFYI(1, ("sndbuf %d rcvbuf %d rcvtimeo 0x%lx", | 1859 | cFYI(1, "sndbuf %d rcvbuf %d rcvtimeo 0x%lx", |
1862 | socket->sk->sk_sndbuf, | 1860 | socket->sk->sk_sndbuf, |
1863 | socket->sk->sk_rcvbuf, socket->sk->sk_rcvtimeo)); | 1861 | socket->sk->sk_rcvbuf, socket->sk->sk_rcvtimeo); |
1864 | 1862 | ||
1865 | /* send RFC1001 sessinit */ | 1863 | /* send RFC1001 sessinit */ |
1866 | if (server->addr.sockAddr.sin_port == htons(RFC1001_PORT)) { | 1864 | if (server->addr.sockAddr.sin_port == htons(RFC1001_PORT)) { |
@@ -1938,13 +1936,13 @@ ipv6_connect(struct TCP_Server_Info *server) | |||
1938 | rc = sock_create_kern(PF_INET6, SOCK_STREAM, | 1936 | rc = sock_create_kern(PF_INET6, SOCK_STREAM, |
1939 | IPPROTO_TCP, &socket); | 1937 | IPPROTO_TCP, &socket); |
1940 | if (rc < 0) { | 1938 | if (rc < 0) { |
1941 | cERROR(1, ("Error %d creating ipv6 socket", rc)); | 1939 | cERROR(1, "Error %d creating ipv6 socket", rc); |
1942 | socket = NULL; | 1940 | socket = NULL; |
1943 | return rc; | 1941 | return rc; |
1944 | } | 1942 | } |
1945 | 1943 | ||
1946 | /* BB other socket options to set KEEPALIVE, NODELAY? */ | 1944 | /* BB other socket options to set KEEPALIVE, NODELAY? */ |
1947 | cFYI(1, ("ipv6 Socket created")); | 1945 | cFYI(1, "ipv6 Socket created"); |
1948 | server->ssocket = socket; | 1946 | server->ssocket = socket; |
1949 | socket->sk->sk_allocation = GFP_NOFS; | 1947 | socket->sk->sk_allocation = GFP_NOFS; |
1950 | cifs_reclassify_socket6(socket); | 1948 | cifs_reclassify_socket6(socket); |
@@ -1988,7 +1986,7 @@ ipv6_connect(struct TCP_Server_Info *server) | |||
1988 | if (!connected) { | 1986 | if (!connected) { |
1989 | if (orig_port) | 1987 | if (orig_port) |
1990 | server->addr.sockAddr6.sin6_port = orig_port; | 1988 | server->addr.sockAddr6.sin6_port = orig_port; |
1991 | cFYI(1, ("Error %d connecting to server via ipv6", rc)); | 1989 | cFYI(1, "Error %d connecting to server via ipv6", rc); |
1992 | sock_release(socket); | 1990 | sock_release(socket); |
1993 | server->ssocket = NULL; | 1991 | server->ssocket = NULL; |
1994 | return rc; | 1992 | return rc; |
@@ -2007,7 +2005,7 @@ ipv6_connect(struct TCP_Server_Info *server) | |||
2007 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, | 2005 | rc = kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, |
2008 | (char *)&val, sizeof(val)); | 2006 | (char *)&val, sizeof(val)); |
2009 | if (rc) | 2007 | if (rc) |
2010 | cFYI(1, ("set TCP_NODELAY socket option error %d", rc)); | 2008 | cFYI(1, "set TCP_NODELAY socket option error %d", rc); |
2011 | } | 2009 | } |
2012 | 2010 | ||
2013 | server->ssocket = socket; | 2011 | server->ssocket = socket; |
@@ -2032,13 +2030,13 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2032 | if (vol_info && vol_info->no_linux_ext) { | 2030 | if (vol_info && vol_info->no_linux_ext) { |
2033 | tcon->fsUnixInfo.Capability = 0; | 2031 | tcon->fsUnixInfo.Capability = 0; |
2034 | tcon->unix_ext = 0; /* Unix Extensions disabled */ | 2032 | tcon->unix_ext = 0; /* Unix Extensions disabled */ |
2035 | cFYI(1, ("Linux protocol extensions disabled")); | 2033 | cFYI(1, "Linux protocol extensions disabled"); |
2036 | return; | 2034 | return; |
2037 | } else if (vol_info) | 2035 | } else if (vol_info) |
2038 | tcon->unix_ext = 1; /* Unix Extensions supported */ | 2036 | tcon->unix_ext = 1; /* Unix Extensions supported */ |
2039 | 2037 | ||
2040 | if (tcon->unix_ext == 0) { | 2038 | if (tcon->unix_ext == 0) { |
2041 | cFYI(1, ("Unix extensions disabled so not set on reconnect")); | 2039 | cFYI(1, "Unix extensions disabled so not set on reconnect"); |
2042 | return; | 2040 | return; |
2043 | } | 2041 | } |
2044 | 2042 | ||
@@ -2054,12 +2052,11 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2054 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; | 2052 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; |
2055 | if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { | 2053 | if ((saved_cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { |
2056 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) | 2054 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) |
2057 | cERROR(1, ("POSIXPATH support change")); | 2055 | cERROR(1, "POSIXPATH support change"); |
2058 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; | 2056 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; |
2059 | } else if ((cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { | 2057 | } else if ((cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) == 0) { |
2060 | cERROR(1, ("possible reconnect error")); | 2058 | cERROR(1, "possible reconnect error"); |
2061 | cERROR(1, | 2059 | cERROR(1, "server disabled POSIX path support"); |
2062 | ("server disabled POSIX path support")); | ||
2063 | } | 2060 | } |
2064 | } | 2061 | } |
2065 | 2062 | ||
@@ -2067,7 +2064,7 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2067 | if (vol_info && vol_info->no_psx_acl) | 2064 | if (vol_info && vol_info->no_psx_acl) |
2068 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; | 2065 | cap &= ~CIFS_UNIX_POSIX_ACL_CAP; |
2069 | else if (CIFS_UNIX_POSIX_ACL_CAP & cap) { | 2066 | else if (CIFS_UNIX_POSIX_ACL_CAP & cap) { |
2070 | cFYI(1, ("negotiated posix acl support")); | 2067 | cFYI(1, "negotiated posix acl support"); |
2071 | if (sb) | 2068 | if (sb) |
2072 | sb->s_flags |= MS_POSIXACL; | 2069 | sb->s_flags |= MS_POSIXACL; |
2073 | } | 2070 | } |
@@ -2075,7 +2072,7 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2075 | if (vol_info && vol_info->posix_paths == 0) | 2072 | if (vol_info && vol_info->posix_paths == 0) |
2076 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; | 2073 | cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; |
2077 | else if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) { | 2074 | else if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) { |
2078 | cFYI(1, ("negotiate posix pathnames")); | 2075 | cFYI(1, "negotiate posix pathnames"); |
2079 | if (sb) | 2076 | if (sb) |
2080 | CIFS_SB(sb)->mnt_cifs_flags |= | 2077 | CIFS_SB(sb)->mnt_cifs_flags |= |
2081 | CIFS_MOUNT_POSIX_PATHS; | 2078 | CIFS_MOUNT_POSIX_PATHS; |
@@ -2090,39 +2087,38 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, | |||
2090 | if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) { | 2087 | if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) { |
2091 | if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) { | 2088 | if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) { |
2092 | CIFS_SB(sb)->rsize = 127 * 1024; | 2089 | CIFS_SB(sb)->rsize = 127 * 1024; |
2093 | cFYI(DBG2, | 2090 | cFYI(DBG2, "larger reads not supported by srv"); |
2094 | ("larger reads not supported by srv")); | ||
2095 | } | 2091 | } |
2096 | } | 2092 | } |
2097 | 2093 | ||
2098 | 2094 | ||
2099 | cFYI(1, ("Negotiate caps 0x%x", (int)cap)); | 2095 | cFYI(1, "Negotiate caps 0x%x", (int)cap); |
2100 | #ifdef CONFIG_CIFS_DEBUG2 | 2096 | #ifdef CONFIG_CIFS_DEBUG2 |
2101 | if (cap & CIFS_UNIX_FCNTL_CAP) | 2097 | if (cap & CIFS_UNIX_FCNTL_CAP) |
2102 | cFYI(1, ("FCNTL cap")); | 2098 | cFYI(1, "FCNTL cap"); |
2103 | if (cap & CIFS_UNIX_EXTATTR_CAP) | 2099 | if (cap & CIFS_UNIX_EXTATTR_CAP) |
2104 | cFYI(1, ("EXTATTR cap")); | 2100 | cFYI(1, "EXTATTR cap"); |
2105 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) | 2101 | if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) |
2106 | cFYI(1, ("POSIX path cap")); | 2102 | cFYI(1, "POSIX path cap"); |
2107 | if (cap & CIFS_UNIX_XATTR_CAP) | 2103 | if (cap & CIFS_UNIX_XATTR_CAP) |
2108 | cFYI(1, ("XATTR cap")); | 2104 | cFYI(1, "XATTR cap"); |
2109 | if (cap & CIFS_UNIX_POSIX_ACL_CAP) | 2105 | if (cap & CIFS_UNIX_POSIX_ACL_CAP) |
2110 | cFYI(1, ("POSIX ACL cap")); | 2106 | cFYI(1, "POSIX ACL cap"); |
2111 | if (cap & CIFS_UNIX_LARGE_READ_CAP) | 2107 | if (cap & CIFS_UNIX_LARGE_READ_CAP) |
2112 | cFYI(1, ("very large read cap")); | 2108 | cFYI(1, "very large read cap"); |
2113 | if (cap & CIFS_UNIX_LARGE_WRITE_CAP) | 2109 | if (cap & CIFS_UNIX_LARGE_WRITE_CAP) |
2114 | cFYI(1, ("very large write cap")); | 2110 | cFYI(1, "very large write cap"); |
2115 | #endif /* CIFS_DEBUG2 */ | 2111 | #endif /* CIFS_DEBUG2 */ |
2116 | if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { | 2112 | if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { |
2117 | if (vol_info == NULL) { | 2113 | if (vol_info == NULL) { |
2118 | cFYI(1, ("resetting capabilities failed")); | 2114 | cFYI(1, "resetting capabilities failed"); |
2119 | } else | 2115 | } else |
2120 | cERROR(1, ("Negotiating Unix capabilities " | 2116 | cERROR(1, "Negotiating Unix capabilities " |
2121 | "with the server failed. Consider " | 2117 | "with the server failed. Consider " |
2122 | "mounting with the Unix Extensions\n" | 2118 | "mounting with the Unix Extensions\n" |
2123 | "disabled, if problems are found, " | 2119 | "disabled, if problems are found, " |
2124 | "by specifying the nounix mount " | 2120 | "by specifying the nounix mount " |
2125 | "option.")); | 2121 | "option."); |
2126 | 2122 | ||
2127 | } | 2123 | } |
2128 | } | 2124 | } |
@@ -2152,8 +2148,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2152 | struct cifs_sb_info *cifs_sb) | 2148 | struct cifs_sb_info *cifs_sb) |
2153 | { | 2149 | { |
2154 | if (pvolume_info->rsize > CIFSMaxBufSize) { | 2150 | if (pvolume_info->rsize > CIFSMaxBufSize) { |
2155 | cERROR(1, ("rsize %d too large, using MaxBufSize", | 2151 | cERROR(1, "rsize %d too large, using MaxBufSize", |
2156 | pvolume_info->rsize)); | 2152 | pvolume_info->rsize); |
2157 | cifs_sb->rsize = CIFSMaxBufSize; | 2153 | cifs_sb->rsize = CIFSMaxBufSize; |
2158 | } else if ((pvolume_info->rsize) && | 2154 | } else if ((pvolume_info->rsize) && |
2159 | (pvolume_info->rsize <= CIFSMaxBufSize)) | 2155 | (pvolume_info->rsize <= CIFSMaxBufSize)) |
@@ -2162,8 +2158,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2162 | cifs_sb->rsize = CIFSMaxBufSize; | 2158 | cifs_sb->rsize = CIFSMaxBufSize; |
2163 | 2159 | ||
2164 | if (pvolume_info->wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) { | 2160 | if (pvolume_info->wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) { |
2165 | cERROR(1, ("wsize %d too large, using 4096 instead", | 2161 | cERROR(1, "wsize %d too large, using 4096 instead", |
2166 | pvolume_info->wsize)); | 2162 | pvolume_info->wsize); |
2167 | cifs_sb->wsize = 4096; | 2163 | cifs_sb->wsize = 4096; |
2168 | } else if (pvolume_info->wsize) | 2164 | } else if (pvolume_info->wsize) |
2169 | cifs_sb->wsize = pvolume_info->wsize; | 2165 | cifs_sb->wsize = pvolume_info->wsize; |
@@ -2181,7 +2177,7 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2181 | if (cifs_sb->rsize < 2048) { | 2177 | if (cifs_sb->rsize < 2048) { |
2182 | cifs_sb->rsize = 2048; | 2178 | cifs_sb->rsize = 2048; |
2183 | /* Windows ME may prefer this */ | 2179 | /* Windows ME may prefer this */ |
2184 | cFYI(1, ("readsize set to minimum: 2048")); | 2180 | cFYI(1, "readsize set to minimum: 2048"); |
2185 | } | 2181 | } |
2186 | /* calculate prepath */ | 2182 | /* calculate prepath */ |
2187 | cifs_sb->prepath = pvolume_info->prepath; | 2183 | cifs_sb->prepath = pvolume_info->prepath; |
@@ -2199,8 +2195,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2199 | cifs_sb->mnt_gid = pvolume_info->linux_gid; | 2195 | cifs_sb->mnt_gid = pvolume_info->linux_gid; |
2200 | cifs_sb->mnt_file_mode = pvolume_info->file_mode; | 2196 | cifs_sb->mnt_file_mode = pvolume_info->file_mode; |
2201 | cifs_sb->mnt_dir_mode = pvolume_info->dir_mode; | 2197 | cifs_sb->mnt_dir_mode = pvolume_info->dir_mode; |
2202 | cFYI(1, ("file mode: 0x%x dir mode: 0x%x", | 2198 | cFYI(1, "file mode: 0x%x dir mode: 0x%x", |
2203 | cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode)); | 2199 | cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); |
2204 | 2200 | ||
2205 | if (pvolume_info->noperm) | 2201 | if (pvolume_info->noperm) |
2206 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM; | 2202 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM; |
@@ -2229,13 +2225,13 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2229 | if (pvolume_info->dynperm) | 2225 | if (pvolume_info->dynperm) |
2230 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; | 2226 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; |
2231 | if (pvolume_info->direct_io) { | 2227 | if (pvolume_info->direct_io) { |
2232 | cFYI(1, ("mounting share using direct i/o")); | 2228 | cFYI(1, "mounting share using direct i/o"); |
2233 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; | 2229 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; |
2234 | } | 2230 | } |
2235 | 2231 | ||
2236 | if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm)) | 2232 | if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm)) |
2237 | cERROR(1, ("mount option dynperm ignored if cifsacl " | 2233 | cERROR(1, "mount option dynperm ignored if cifsacl " |
2238 | "mount option supported")); | 2234 | "mount option supported"); |
2239 | } | 2235 | } |
2240 | 2236 | ||
2241 | static int | 2237 | static int |
@@ -2344,11 +2340,11 @@ try_mount_again: | |||
2344 | } | 2340 | } |
2345 | 2341 | ||
2346 | if (volume_info->nullauth) { | 2342 | if (volume_info->nullauth) { |
2347 | cFYI(1, ("null user")); | 2343 | cFYI(1, "null user"); |
2348 | volume_info->username = ""; | 2344 | volume_info->username = ""; |
2349 | } else if (volume_info->username) { | 2345 | } else if (volume_info->username) { |
2350 | /* BB fixme parse for domain name here */ | 2346 | /* BB fixme parse for domain name here */ |
2351 | cFYI(1, ("Username: %s", volume_info->username)); | 2347 | cFYI(1, "Username: %s", volume_info->username); |
2352 | } else { | 2348 | } else { |
2353 | cifserror("No username specified"); | 2349 | cifserror("No username specified"); |
2354 | /* In userspace mount helper we can get user name from alternate | 2350 | /* In userspace mount helper we can get user name from alternate |
@@ -2365,8 +2361,8 @@ try_mount_again: | |||
2365 | } else { | 2361 | } else { |
2366 | cifs_sb->local_nls = load_nls(volume_info->iocharset); | 2362 | cifs_sb->local_nls = load_nls(volume_info->iocharset); |
2367 | if (cifs_sb->local_nls == NULL) { | 2363 | if (cifs_sb->local_nls == NULL) { |
2368 | cERROR(1, ("CIFS mount error: iocharset %s not found", | 2364 | cERROR(1, "CIFS mount error: iocharset %s not found", |
2369 | volume_info->iocharset)); | 2365 | volume_info->iocharset); |
2370 | rc = -ELIBACC; | 2366 | rc = -ELIBACC; |
2371 | goto out; | 2367 | goto out; |
2372 | } | 2368 | } |
@@ -2381,8 +2377,8 @@ try_mount_again: | |||
2381 | 2377 | ||
2382 | pSesInfo = cifs_find_smb_ses(srvTcp, volume_info->username); | 2378 | pSesInfo = cifs_find_smb_ses(srvTcp, volume_info->username); |
2383 | if (pSesInfo) { | 2379 | if (pSesInfo) { |
2384 | cFYI(1, ("Existing smb sess found (status=%d)", | 2380 | cFYI(1, "Existing smb sess found (status=%d)", |
2385 | pSesInfo->status)); | 2381 | pSesInfo->status); |
2386 | /* | 2382 | /* |
2387 | * The existing SMB session already has a reference to srvTcp, | 2383 | * The existing SMB session already has a reference to srvTcp, |
2388 | * so we can put back the extra one we got before | 2384 | * so we can put back the extra one we got before |
@@ -2391,13 +2387,13 @@ try_mount_again: | |||
2391 | 2387 | ||
2392 | mutex_lock(&pSesInfo->session_mutex); | 2388 | mutex_lock(&pSesInfo->session_mutex); |
2393 | if (pSesInfo->need_reconnect) { | 2389 | if (pSesInfo->need_reconnect) { |
2394 | cFYI(1, ("Session needs reconnect")); | 2390 | cFYI(1, "Session needs reconnect"); |
2395 | rc = cifs_setup_session(xid, pSesInfo, | 2391 | rc = cifs_setup_session(xid, pSesInfo, |
2396 | cifs_sb->local_nls); | 2392 | cifs_sb->local_nls); |
2397 | } | 2393 | } |
2398 | mutex_unlock(&pSesInfo->session_mutex); | 2394 | mutex_unlock(&pSesInfo->session_mutex); |
2399 | } else if (!rc) { | 2395 | } else if (!rc) { |
2400 | cFYI(1, ("Existing smb sess not found")); | 2396 | cFYI(1, "Existing smb sess not found"); |
2401 | pSesInfo = sesInfoAlloc(); | 2397 | pSesInfo = sesInfoAlloc(); |
2402 | if (pSesInfo == NULL) { | 2398 | if (pSesInfo == NULL) { |
2403 | rc = -ENOMEM; | 2399 | rc = -ENOMEM; |
@@ -2452,12 +2448,12 @@ try_mount_again: | |||
2452 | 2448 | ||
2453 | tcon = cifs_find_tcon(pSesInfo, volume_info->UNC); | 2449 | tcon = cifs_find_tcon(pSesInfo, volume_info->UNC); |
2454 | if (tcon) { | 2450 | if (tcon) { |
2455 | cFYI(1, ("Found match on UNC path")); | 2451 | cFYI(1, "Found match on UNC path"); |
2456 | /* existing tcon already has a reference */ | 2452 | /* existing tcon already has a reference */ |
2457 | cifs_put_smb_ses(pSesInfo); | 2453 | cifs_put_smb_ses(pSesInfo); |
2458 | if (tcon->seal != volume_info->seal) | 2454 | if (tcon->seal != volume_info->seal) |
2459 | cERROR(1, ("transport encryption setting " | 2455 | cERROR(1, "transport encryption setting " |
2460 | "conflicts with existing tid")); | 2456 | "conflicts with existing tid"); |
2461 | } else { | 2457 | } else { |
2462 | tcon = tconInfoAlloc(); | 2458 | tcon = tconInfoAlloc(); |
2463 | if (tcon == NULL) { | 2459 | if (tcon == NULL) { |
@@ -2477,7 +2473,7 @@ try_mount_again: | |||
2477 | 2473 | ||
2478 | if ((strchr(volume_info->UNC + 3, '\\') == NULL) | 2474 | if ((strchr(volume_info->UNC + 3, '\\') == NULL) |
2479 | && (strchr(volume_info->UNC + 3, '/') == NULL)) { | 2475 | && (strchr(volume_info->UNC + 3, '/') == NULL)) { |
2480 | cERROR(1, ("Missing share name")); | 2476 | cERROR(1, "Missing share name"); |
2481 | rc = -ENODEV; | 2477 | rc = -ENODEV; |
2482 | goto mount_fail_check; | 2478 | goto mount_fail_check; |
2483 | } else { | 2479 | } else { |
@@ -2486,11 +2482,11 @@ try_mount_again: | |||
2486 | * we do on SessSetup and reconnect? */ | 2482 | * we do on SessSetup and reconnect? */ |
2487 | rc = CIFSTCon(xid, pSesInfo, volume_info->UNC, | 2483 | rc = CIFSTCon(xid, pSesInfo, volume_info->UNC, |
2488 | tcon, cifs_sb->local_nls); | 2484 | tcon, cifs_sb->local_nls); |
2489 | cFYI(1, ("CIFS Tcon rc = %d", rc)); | 2485 | cFYI(1, "CIFS Tcon rc = %d", rc); |
2490 | if (volume_info->nodfs) { | 2486 | if (volume_info->nodfs) { |
2491 | tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; | 2487 | tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; |
2492 | cFYI(1, ("DFS disabled (%d)", | 2488 | cFYI(1, "DFS disabled (%d)", |
2493 | tcon->Flags)); | 2489 | tcon->Flags); |
2494 | } | 2490 | } |
2495 | } | 2491 | } |
2496 | if (rc) | 2492 | if (rc) |
@@ -2544,7 +2540,7 @@ try_mount_again: | |||
2544 | 2540 | ||
2545 | if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) { | 2541 | if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) { |
2546 | cifs_sb->rsize = 1024 * 127; | 2542 | cifs_sb->rsize = 1024 * 127; |
2547 | cFYI(DBG2, ("no very large read support, rsize now 127K")); | 2543 | cFYI(DBG2, "no very large read support, rsize now 127K"); |
2548 | } | 2544 | } |
2549 | if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X)) | 2545 | if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X)) |
2550 | cifs_sb->wsize = min(cifs_sb->wsize, | 2546 | cifs_sb->wsize = min(cifs_sb->wsize, |
@@ -2593,7 +2589,7 @@ remote_path_check: | |||
2593 | goto mount_fail_check; | 2589 | goto mount_fail_check; |
2594 | } | 2590 | } |
2595 | 2591 | ||
2596 | cFYI(1, ("Getting referral for: %s", full_path)); | 2592 | cFYI(1, "Getting referral for: %s", full_path); |
2597 | rc = get_dfs_path(xid, pSesInfo , full_path + 1, | 2593 | rc = get_dfs_path(xid, pSesInfo , full_path + 1, |
2598 | cifs_sb->local_nls, &num_referrals, &referrals, | 2594 | cifs_sb->local_nls, &num_referrals, &referrals, |
2599 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 2595 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
@@ -2778,13 +2774,13 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
2778 | if (length == 3) { | 2774 | if (length == 3) { |
2779 | if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') && | 2775 | if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') && |
2780 | (bcc_ptr[2] == 'C')) { | 2776 | (bcc_ptr[2] == 'C')) { |
2781 | cFYI(1, ("IPC connection")); | 2777 | cFYI(1, "IPC connection"); |
2782 | tcon->ipc = 1; | 2778 | tcon->ipc = 1; |
2783 | } | 2779 | } |
2784 | } else if (length == 2) { | 2780 | } else if (length == 2) { |
2785 | if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) { | 2781 | if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) { |
2786 | /* the most common case */ | 2782 | /* the most common case */ |
2787 | cFYI(1, ("disk share connection")); | 2783 | cFYI(1, "disk share connection"); |
2788 | } | 2784 | } |
2789 | } | 2785 | } |
2790 | bcc_ptr += length + 1; | 2786 | bcc_ptr += length + 1; |
@@ -2797,7 +2793,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
2797 | bytes_left, is_unicode, | 2793 | bytes_left, is_unicode, |
2798 | nls_codepage); | 2794 | nls_codepage); |
2799 | 2795 | ||
2800 | cFYI(1, ("nativeFileSystem=%s", tcon->nativeFileSystem)); | 2796 | cFYI(1, "nativeFileSystem=%s", tcon->nativeFileSystem); |
2801 | 2797 | ||
2802 | if ((smb_buffer_response->WordCount == 3) || | 2798 | if ((smb_buffer_response->WordCount == 3) || |
2803 | (smb_buffer_response->WordCount == 7)) | 2799 | (smb_buffer_response->WordCount == 7)) |
@@ -2805,7 +2801,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
2805 | tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport); | 2801 | tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport); |
2806 | else | 2802 | else |
2807 | tcon->Flags = 0; | 2803 | tcon->Flags = 0; |
2808 | cFYI(1, ("Tcon flags: 0x%x ", tcon->Flags)); | 2804 | cFYI(1, "Tcon flags: 0x%x ", tcon->Flags); |
2809 | } else if ((rc == 0) && tcon == NULL) { | 2805 | } else if ((rc == 0) && tcon == NULL) { |
2810 | /* all we need to save for IPC$ connection */ | 2806 | /* all we need to save for IPC$ connection */ |
2811 | ses->ipc_tid = smb_buffer_response->Tid; | 2807 | ses->ipc_tid = smb_buffer_response->Tid; |
@@ -2869,14 +2865,14 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo, | |||
2869 | if (linuxExtEnabled == 0) | 2865 | if (linuxExtEnabled == 0) |
2870 | pSesInfo->capabilities &= (~CAP_UNIX); | 2866 | pSesInfo->capabilities &= (~CAP_UNIX); |
2871 | 2867 | ||
2872 | cFYI(1, ("Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", | 2868 | cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", |
2873 | server->secMode, server->capabilities, server->timeAdj)); | 2869 | server->secMode, server->capabilities, server->timeAdj); |
2874 | 2870 | ||
2875 | rc = CIFS_SessSetup(xid, pSesInfo, first_time, nls_info); | 2871 | rc = CIFS_SessSetup(xid, pSesInfo, first_time, nls_info); |
2876 | if (rc) { | 2872 | if (rc) { |
2877 | cERROR(1, ("Send error in SessSetup = %d", rc)); | 2873 | cERROR(1, "Send error in SessSetup = %d", rc); |
2878 | } else { | 2874 | } else { |
2879 | cFYI(1, ("CIFS Session Established successfully")); | 2875 | cFYI(1, "CIFS Session Established successfully"); |
2880 | spin_lock(&GlobalMid_Lock); | 2876 | spin_lock(&GlobalMid_Lock); |
2881 | pSesInfo->status = CifsGood; | 2877 | pSesInfo->status = CifsGood; |
2882 | pSesInfo->need_reconnect = false; | 2878 | pSesInfo->need_reconnect = false; |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index e9f7ecc2714b..4aa2fe3f535f 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -73,7 +73,7 @@ cifs_bp_rename_retry: | |||
73 | namelen += (1 + temp->d_name.len); | 73 | namelen += (1 + temp->d_name.len); |
74 | temp = temp->d_parent; | 74 | temp = temp->d_parent; |
75 | if (temp == NULL) { | 75 | if (temp == NULL) { |
76 | cERROR(1, ("corrupt dentry")); | 76 | cERROR(1, "corrupt dentry"); |
77 | return NULL; | 77 | return NULL; |
78 | } | 78 | } |
79 | } | 79 | } |
@@ -90,19 +90,18 @@ cifs_bp_rename_retry: | |||
90 | full_path[namelen] = dirsep; | 90 | full_path[namelen] = dirsep; |
91 | strncpy(full_path + namelen + 1, temp->d_name.name, | 91 | strncpy(full_path + namelen + 1, temp->d_name.name, |
92 | temp->d_name.len); | 92 | temp->d_name.len); |
93 | cFYI(0, ("name: %s", full_path + namelen)); | 93 | cFYI(0, "name: %s", full_path + namelen); |
94 | } | 94 | } |
95 | temp = temp->d_parent; | 95 | temp = temp->d_parent; |
96 | if (temp == NULL) { | 96 | if (temp == NULL) { |
97 | cERROR(1, ("corrupt dentry")); | 97 | cERROR(1, "corrupt dentry"); |
98 | kfree(full_path); | 98 | kfree(full_path); |
99 | return NULL; | 99 | return NULL; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | if (namelen != pplen + dfsplen) { | 102 | if (namelen != pplen + dfsplen) { |
103 | cERROR(1, | 103 | cERROR(1, "did not end path lookup where expected namelen is %d", |
104 | ("did not end path lookup where expected namelen is %d", | 104 | namelen); |
105 | namelen)); | ||
106 | /* presumably this is only possible if racing with a rename | 105 | /* presumably this is only possible if racing with a rename |
107 | of one of the parent directories (we can not lock the dentries | 106 | of one of the parent directories (we can not lock the dentries |
108 | above us to prevent this, but retrying should be harmless) */ | 107 | above us to prevent this, but retrying should be harmless) */ |
@@ -173,7 +172,7 @@ cifs_new_fileinfo(struct inode *newinode, __u16 fileHandle, | |||
173 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { | 172 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { |
174 | pCifsInode->clientCanCacheAll = true; | 173 | pCifsInode->clientCanCacheAll = true; |
175 | pCifsInode->clientCanCacheRead = true; | 174 | pCifsInode->clientCanCacheRead = true; |
176 | cFYI(1, ("Exclusive Oplock inode %p", newinode)); | 175 | cFYI(1, "Exclusive Oplock inode %p", newinode); |
177 | } else if ((oplock & 0xF) == OPLOCK_READ) | 176 | } else if ((oplock & 0xF) == OPLOCK_READ) |
178 | pCifsInode->clientCanCacheRead = true; | 177 | pCifsInode->clientCanCacheRead = true; |
179 | } | 178 | } |
@@ -192,7 +191,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode, | |||
192 | struct cifs_sb_info *cifs_sb = CIFS_SB(mnt->mnt_sb); | 191 | struct cifs_sb_info *cifs_sb = CIFS_SB(mnt->mnt_sb); |
193 | struct cifs_fattr fattr; | 192 | struct cifs_fattr fattr; |
194 | 193 | ||
195 | cFYI(1, ("posix open %s", full_path)); | 194 | cFYI(1, "posix open %s", full_path); |
196 | 195 | ||
197 | presp_data = kzalloc(sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL); | 196 | presp_data = kzalloc(sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL); |
198 | if (presp_data == NULL) | 197 | if (presp_data == NULL) |
@@ -358,7 +357,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
358 | else if ((oflags & O_CREAT) == O_CREAT) | 357 | else if ((oflags & O_CREAT) == O_CREAT) |
359 | disposition = FILE_OPEN_IF; | 358 | disposition = FILE_OPEN_IF; |
360 | else | 359 | else |
361 | cFYI(1, ("Create flag not set in create function")); | 360 | cFYI(1, "Create flag not set in create function"); |
362 | } | 361 | } |
363 | 362 | ||
364 | /* BB add processing to set equivalent of mode - e.g. via CreateX with | 363 | /* BB add processing to set equivalent of mode - e.g. via CreateX with |
@@ -394,7 +393,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
394 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 393 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
395 | } | 394 | } |
396 | if (rc) { | 395 | if (rc) { |
397 | cFYI(1, ("cifs_create returned 0x%x", rc)); | 396 | cFYI(1, "cifs_create returned 0x%x", rc); |
398 | goto cifs_create_out; | 397 | goto cifs_create_out; |
399 | } | 398 | } |
400 | 399 | ||
@@ -457,7 +456,7 @@ cifs_create_set_dentry: | |||
457 | if (rc == 0) | 456 | if (rc == 0) |
458 | setup_cifs_dentry(tcon, direntry, newinode); | 457 | setup_cifs_dentry(tcon, direntry, newinode); |
459 | else | 458 | else |
460 | cFYI(1, ("Create worked, get_inode_info failed rc = %d", rc)); | 459 | cFYI(1, "Create worked, get_inode_info failed rc = %d", rc); |
461 | 460 | ||
462 | /* nfsd case - nfs srv does not set nd */ | 461 | /* nfsd case - nfs srv does not set nd */ |
463 | if ((nd == NULL) || (!(nd->flags & LOOKUP_OPEN))) { | 462 | if ((nd == NULL) || (!(nd->flags & LOOKUP_OPEN))) { |
@@ -531,7 +530,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, | |||
531 | u16 fileHandle; | 530 | u16 fileHandle; |
532 | FILE_ALL_INFO *buf; | 531 | FILE_ALL_INFO *buf; |
533 | 532 | ||
534 | cFYI(1, ("sfu compat create special file")); | 533 | cFYI(1, "sfu compat create special file"); |
535 | 534 | ||
536 | buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); | 535 | buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); |
537 | if (buf == NULL) { | 536 | if (buf == NULL) { |
@@ -616,8 +615,8 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
616 | 615 | ||
617 | xid = GetXid(); | 616 | xid = GetXid(); |
618 | 617 | ||
619 | cFYI(1, ("parent inode = 0x%p name is: %s and dentry = 0x%p", | 618 | cFYI(1, "parent inode = 0x%p name is: %s and dentry = 0x%p", |
620 | parent_dir_inode, direntry->d_name.name, direntry)); | 619 | parent_dir_inode, direntry->d_name.name, direntry); |
621 | 620 | ||
622 | /* check whether path exists */ | 621 | /* check whether path exists */ |
623 | 622 | ||
@@ -632,7 +631,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
632 | int i; | 631 | int i; |
633 | for (i = 0; i < direntry->d_name.len; i++) | 632 | for (i = 0; i < direntry->d_name.len; i++) |
634 | if (direntry->d_name.name[i] == '\\') { | 633 | if (direntry->d_name.name[i] == '\\') { |
635 | cFYI(1, ("Invalid file name")); | 634 | cFYI(1, "Invalid file name"); |
636 | FreeXid(xid); | 635 | FreeXid(xid); |
637 | return ERR_PTR(-EINVAL); | 636 | return ERR_PTR(-EINVAL); |
638 | } | 637 | } |
@@ -657,11 +656,11 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
657 | } | 656 | } |
658 | 657 | ||
659 | if (direntry->d_inode != NULL) { | 658 | if (direntry->d_inode != NULL) { |
660 | cFYI(1, ("non-NULL inode in lookup")); | 659 | cFYI(1, "non-NULL inode in lookup"); |
661 | } else { | 660 | } else { |
662 | cFYI(1, ("NULL inode in lookup")); | 661 | cFYI(1, "NULL inode in lookup"); |
663 | } | 662 | } |
664 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, direntry->d_inode)); | 663 | cFYI(1, "Full path: %s inode = 0x%p", full_path, direntry->d_inode); |
665 | 664 | ||
666 | /* Posix open is only called (at lookup time) for file create now. | 665 | /* Posix open is only called (at lookup time) for file create now. |
667 | * For opens (rather than creates), because we do not know if it | 666 | * For opens (rather than creates), because we do not know if it |
@@ -723,7 +722,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
723 | /* if it was once a directory (but how can we tell?) we could do | 722 | /* if it was once a directory (but how can we tell?) we could do |
724 | shrink_dcache_parent(direntry); */ | 723 | shrink_dcache_parent(direntry); */ |
725 | } else if (rc != -EACCES) { | 724 | } else if (rc != -EACCES) { |
726 | cERROR(1, ("Unexpected lookup error %d", rc)); | 725 | cERROR(1, "Unexpected lookup error %d", rc); |
727 | /* We special case check for Access Denied - since that | 726 | /* We special case check for Access Denied - since that |
728 | is a common return code */ | 727 | is a common return code */ |
729 | } | 728 | } |
@@ -742,8 +741,8 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) | |||
742 | if (cifs_revalidate_dentry(direntry)) | 741 | if (cifs_revalidate_dentry(direntry)) |
743 | return 0; | 742 | return 0; |
744 | } else { | 743 | } else { |
745 | cFYI(1, ("neg dentry 0x%p name = %s", | 744 | cFYI(1, "neg dentry 0x%p name = %s", |
746 | direntry, direntry->d_name.name)); | 745 | direntry, direntry->d_name.name); |
747 | if (time_after(jiffies, direntry->d_time + HZ) || | 746 | if (time_after(jiffies, direntry->d_time + HZ) || |
748 | !lookupCacheEnabled) { | 747 | !lookupCacheEnabled) { |
749 | d_drop(direntry); | 748 | d_drop(direntry); |
@@ -758,7 +757,7 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) | |||
758 | { | 757 | { |
759 | int rc = 0; | 758 | int rc = 0; |
760 | 759 | ||
761 | cFYI(1, ("In cifs d_delete, name = %s", direntry->d_name.name)); | 760 | cFYI(1, "In cifs d_delete, name = %s", direntry->d_name.name); |
762 | 761 | ||
763 | return rc; | 762 | return rc; |
764 | } */ | 763 | } */ |
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index 6f8a0e3fb25b..4db2c5e7283f 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c | |||
@@ -106,14 +106,14 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
106 | /* search for server name delimiter */ | 106 | /* search for server name delimiter */ |
107 | len = strlen(unc); | 107 | len = strlen(unc); |
108 | if (len < 3) { | 108 | if (len < 3) { |
109 | cFYI(1, ("%s: unc is too short: %s", __func__, unc)); | 109 | cFYI(1, "%s: unc is too short: %s", __func__, unc); |
110 | return -EINVAL; | 110 | return -EINVAL; |
111 | } | 111 | } |
112 | len -= 2; | 112 | len -= 2; |
113 | name = memchr(unc+2, '\\', len); | 113 | name = memchr(unc+2, '\\', len); |
114 | if (!name) { | 114 | if (!name) { |
115 | cFYI(1, ("%s: probably server name is whole unc: %s", | 115 | cFYI(1, "%s: probably server name is whole unc: %s", |
116 | __func__, unc)); | 116 | __func__, unc); |
117 | } else { | 117 | } else { |
118 | len = (name - unc) - 2/* leading // */; | 118 | len = (name - unc) - 2/* leading // */; |
119 | } | 119 | } |
@@ -127,8 +127,8 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
127 | name[len] = 0; | 127 | name[len] = 0; |
128 | 128 | ||
129 | if (is_ip(name)) { | 129 | if (is_ip(name)) { |
130 | cFYI(1, ("%s: it is IP, skipping dns upcall: %s", | 130 | cFYI(1, "%s: it is IP, skipping dns upcall: %s", |
131 | __func__, name)); | 131 | __func__, name); |
132 | data = name; | 132 | data = name; |
133 | goto skip_upcall; | 133 | goto skip_upcall; |
134 | } | 134 | } |
@@ -138,7 +138,7 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
138 | len = rkey->type_data.x[0]; | 138 | len = rkey->type_data.x[0]; |
139 | data = rkey->payload.data; | 139 | data = rkey->payload.data; |
140 | } else { | 140 | } else { |
141 | cERROR(1, ("%s: unable to resolve: %s", __func__, name)); | 141 | cERROR(1, "%s: unable to resolve: %s", __func__, name); |
142 | goto out; | 142 | goto out; |
143 | } | 143 | } |
144 | 144 | ||
@@ -148,10 +148,10 @@ skip_upcall: | |||
148 | if (*ip_addr) { | 148 | if (*ip_addr) { |
149 | memcpy(*ip_addr, data, len + 1); | 149 | memcpy(*ip_addr, data, len + 1); |
150 | if (!IS_ERR(rkey)) | 150 | if (!IS_ERR(rkey)) |
151 | cFYI(1, ("%s: resolved: %s to %s", __func__, | 151 | cFYI(1, "%s: resolved: %s to %s", __func__, |
152 | name, | 152 | name, |
153 | *ip_addr | 153 | *ip_addr |
154 | )); | 154 | ); |
155 | rc = 0; | 155 | rc = 0; |
156 | } else { | 156 | } else { |
157 | rc = -ENOMEM; | 157 | rc = -ENOMEM; |
diff --git a/fs/cifs/export.c b/fs/cifs/export.c index 6177f7cca16a..993f82045bf6 100644 --- a/fs/cifs/export.c +++ b/fs/cifs/export.c | |||
@@ -49,7 +49,7 @@ | |||
49 | static struct dentry *cifs_get_parent(struct dentry *dentry) | 49 | static struct dentry *cifs_get_parent(struct dentry *dentry) |
50 | { | 50 | { |
51 | /* BB need to add code here eventually to enable export via NFSD */ | 51 | /* BB need to add code here eventually to enable export via NFSD */ |
52 | cFYI(1, ("get parent for %p", dentry)); | 52 | cFYI(1, "get parent for %p", dentry); |
53 | return ERR_PTR(-EACCES); | 53 | return ERR_PTR(-EACCES); |
54 | } | 54 | } |
55 | 55 | ||
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 1361d67f68f3..ed3689e6617c 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -136,15 +136,15 @@ cifs_posix_open_inode_helper(struct inode *inode, struct file *file, | |||
136 | if (timespec_equal(&file->f_path.dentry->d_inode->i_mtime, &temp) && | 136 | if (timespec_equal(&file->f_path.dentry->d_inode->i_mtime, &temp) && |
137 | (file->f_path.dentry->d_inode->i_size == | 137 | (file->f_path.dentry->d_inode->i_size == |
138 | (loff_t)le64_to_cpu(buf->EndOfFile))) { | 138 | (loff_t)le64_to_cpu(buf->EndOfFile))) { |
139 | cFYI(1, ("inode unchanged on server")); | 139 | cFYI(1, "inode unchanged on server"); |
140 | } else { | 140 | } else { |
141 | if (file->f_path.dentry->d_inode->i_mapping) { | 141 | if (file->f_path.dentry->d_inode->i_mapping) { |
142 | rc = filemap_write_and_wait(file->f_path.dentry->d_inode->i_mapping); | 142 | rc = filemap_write_and_wait(file->f_path.dentry->d_inode->i_mapping); |
143 | if (rc != 0) | 143 | if (rc != 0) |
144 | CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; | 144 | CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; |
145 | } | 145 | } |
146 | cFYI(1, ("invalidating remote inode since open detected it " | 146 | cFYI(1, "invalidating remote inode since open detected it " |
147 | "changed")); | 147 | "changed"); |
148 | invalidate_remote_inode(file->f_path.dentry->d_inode); | 148 | invalidate_remote_inode(file->f_path.dentry->d_inode); |
149 | } */ | 149 | } */ |
150 | 150 | ||
@@ -152,8 +152,8 @@ psx_client_can_cache: | |||
152 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { | 152 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { |
153 | pCifsInode->clientCanCacheAll = true; | 153 | pCifsInode->clientCanCacheAll = true; |
154 | pCifsInode->clientCanCacheRead = true; | 154 | pCifsInode->clientCanCacheRead = true; |
155 | cFYI(1, ("Exclusive Oplock granted on inode %p", | 155 | cFYI(1, "Exclusive Oplock granted on inode %p", |
156 | file->f_path.dentry->d_inode)); | 156 | file->f_path.dentry->d_inode); |
157 | } else if ((oplock & 0xF) == OPLOCK_READ) | 157 | } else if ((oplock & 0xF) == OPLOCK_READ) |
158 | pCifsInode->clientCanCacheRead = true; | 158 | pCifsInode->clientCanCacheRead = true; |
159 | 159 | ||
@@ -190,8 +190,8 @@ cifs_fill_filedata(struct file *file) | |||
190 | if (file->private_data != NULL) { | 190 | if (file->private_data != NULL) { |
191 | return pCifsFile; | 191 | return pCifsFile; |
192 | } else if ((file->f_flags & O_CREAT) && (file->f_flags & O_EXCL)) | 192 | } else if ((file->f_flags & O_CREAT) && (file->f_flags & O_EXCL)) |
193 | cERROR(1, ("could not find file instance for " | 193 | cERROR(1, "could not find file instance for " |
194 | "new file %p", file)); | 194 | "new file %p", file); |
195 | return NULL; | 195 | return NULL; |
196 | } | 196 | } |
197 | 197 | ||
@@ -217,7 +217,7 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | |||
217 | if (timespec_equal(&file->f_path.dentry->d_inode->i_mtime, &temp) && | 217 | if (timespec_equal(&file->f_path.dentry->d_inode->i_mtime, &temp) && |
218 | (file->f_path.dentry->d_inode->i_size == | 218 | (file->f_path.dentry->d_inode->i_size == |
219 | (loff_t)le64_to_cpu(buf->EndOfFile))) { | 219 | (loff_t)le64_to_cpu(buf->EndOfFile))) { |
220 | cFYI(1, ("inode unchanged on server")); | 220 | cFYI(1, "inode unchanged on server"); |
221 | } else { | 221 | } else { |
222 | if (file->f_path.dentry->d_inode->i_mapping) { | 222 | if (file->f_path.dentry->d_inode->i_mapping) { |
223 | /* BB no need to lock inode until after invalidate | 223 | /* BB no need to lock inode until after invalidate |
@@ -226,8 +226,8 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | |||
226 | if (rc != 0) | 226 | if (rc != 0) |
227 | CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; | 227 | CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; |
228 | } | 228 | } |
229 | cFYI(1, ("invalidating remote inode since open detected it " | 229 | cFYI(1, "invalidating remote inode since open detected it " |
230 | "changed")); | 230 | "changed"); |
231 | invalidate_remote_inode(file->f_path.dentry->d_inode); | 231 | invalidate_remote_inode(file->f_path.dentry->d_inode); |
232 | } | 232 | } |
233 | 233 | ||
@@ -242,8 +242,8 @@ client_can_cache: | |||
242 | if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) { | 242 | if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) { |
243 | pCifsInode->clientCanCacheAll = true; | 243 | pCifsInode->clientCanCacheAll = true; |
244 | pCifsInode->clientCanCacheRead = true; | 244 | pCifsInode->clientCanCacheRead = true; |
245 | cFYI(1, ("Exclusive Oplock granted on inode %p", | 245 | cFYI(1, "Exclusive Oplock granted on inode %p", |
246 | file->f_path.dentry->d_inode)); | 246 | file->f_path.dentry->d_inode); |
247 | } else if ((*oplock & 0xF) == OPLOCK_READ) | 247 | } else if ((*oplock & 0xF) == OPLOCK_READ) |
248 | pCifsInode->clientCanCacheRead = true; | 248 | pCifsInode->clientCanCacheRead = true; |
249 | 249 | ||
@@ -285,8 +285,8 @@ int cifs_open(struct inode *inode, struct file *file) | |||
285 | return rc; | 285 | return rc; |
286 | } | 286 | } |
287 | 287 | ||
288 | cFYI(1, ("inode = 0x%p file flags are 0x%x for %s", | 288 | cFYI(1, "inode = 0x%p file flags are 0x%x for %s", |
289 | inode, file->f_flags, full_path)); | 289 | inode, file->f_flags, full_path); |
290 | 290 | ||
291 | if (oplockEnabled) | 291 | if (oplockEnabled) |
292 | oplock = REQ_OPLOCK; | 292 | oplock = REQ_OPLOCK; |
@@ -303,7 +303,7 @@ int cifs_open(struct inode *inode, struct file *file) | |||
303 | cifs_sb->mnt_file_mode /* ignored */, | 303 | cifs_sb->mnt_file_mode /* ignored */, |
304 | oflags, &oplock, &netfid, xid); | 304 | oflags, &oplock, &netfid, xid); |
305 | if (rc == 0) { | 305 | if (rc == 0) { |
306 | cFYI(1, ("posix open succeeded")); | 306 | cFYI(1, "posix open succeeded"); |
307 | /* no need for special case handling of setting mode | 307 | /* no need for special case handling of setting mode |
308 | on read only files needed here */ | 308 | on read only files needed here */ |
309 | 309 | ||
@@ -313,12 +313,12 @@ int cifs_open(struct inode *inode, struct file *file) | |||
313 | goto out; | 313 | goto out; |
314 | } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { | 314 | } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { |
315 | if (tcon->ses->serverNOS) | 315 | if (tcon->ses->serverNOS) |
316 | cERROR(1, ("server %s of type %s returned" | 316 | cERROR(1, "server %s of type %s returned" |
317 | " unexpected error on SMB posix open" | 317 | " unexpected error on SMB posix open" |
318 | ", disabling posix open support." | 318 | ", disabling posix open support." |
319 | " Check if server update available.", | 319 | " Check if server update available.", |
320 | tcon->ses->serverName, | 320 | tcon->ses->serverName, |
321 | tcon->ses->serverNOS)); | 321 | tcon->ses->serverNOS); |
322 | tcon->broken_posix_open = true; | 322 | tcon->broken_posix_open = true; |
323 | } else if ((rc != -EIO) && (rc != -EREMOTE) && | 323 | } else if ((rc != -EIO) && (rc != -EREMOTE) && |
324 | (rc != -EOPNOTSUPP)) /* path not found or net err */ | 324 | (rc != -EOPNOTSUPP)) /* path not found or net err */ |
@@ -386,7 +386,7 @@ int cifs_open(struct inode *inode, struct file *file) | |||
386 | & CIFS_MOUNT_MAP_SPECIAL_CHR); | 386 | & CIFS_MOUNT_MAP_SPECIAL_CHR); |
387 | } | 387 | } |
388 | if (rc) { | 388 | if (rc) { |
389 | cFYI(1, ("cifs_open returned 0x%x", rc)); | 389 | cFYI(1, "cifs_open returned 0x%x", rc); |
390 | goto out; | 390 | goto out; |
391 | } | 391 | } |
392 | 392 | ||
@@ -469,7 +469,7 @@ static int cifs_reopen_file(struct file *file, bool can_flush) | |||
469 | } | 469 | } |
470 | 470 | ||
471 | if (file->f_path.dentry == NULL) { | 471 | if (file->f_path.dentry == NULL) { |
472 | cERROR(1, ("no valid name if dentry freed")); | 472 | cERROR(1, "no valid name if dentry freed"); |
473 | dump_stack(); | 473 | dump_stack(); |
474 | rc = -EBADF; | 474 | rc = -EBADF; |
475 | goto reopen_error_exit; | 475 | goto reopen_error_exit; |
@@ -477,7 +477,7 @@ static int cifs_reopen_file(struct file *file, bool can_flush) | |||
477 | 477 | ||
478 | inode = file->f_path.dentry->d_inode; | 478 | inode = file->f_path.dentry->d_inode; |
479 | if (inode == NULL) { | 479 | if (inode == NULL) { |
480 | cERROR(1, ("inode not valid")); | 480 | cERROR(1, "inode not valid"); |
481 | dump_stack(); | 481 | dump_stack(); |
482 | rc = -EBADF; | 482 | rc = -EBADF; |
483 | goto reopen_error_exit; | 483 | goto reopen_error_exit; |
@@ -499,8 +499,8 @@ reopen_error_exit: | |||
499 | return rc; | 499 | return rc; |
500 | } | 500 | } |
501 | 501 | ||
502 | cFYI(1, ("inode = 0x%p file flags 0x%x for %s", | 502 | cFYI(1, "inode = 0x%p file flags 0x%x for %s", |
503 | inode, file->f_flags, full_path)); | 503 | inode, file->f_flags, full_path); |
504 | 504 | ||
505 | if (oplockEnabled) | 505 | if (oplockEnabled) |
506 | oplock = REQ_OPLOCK; | 506 | oplock = REQ_OPLOCK; |
@@ -516,7 +516,7 @@ reopen_error_exit: | |||
516 | cifs_sb->mnt_file_mode /* ignored */, | 516 | cifs_sb->mnt_file_mode /* ignored */, |
517 | oflags, &oplock, &netfid, xid); | 517 | oflags, &oplock, &netfid, xid); |
518 | if (rc == 0) { | 518 | if (rc == 0) { |
519 | cFYI(1, ("posix reopen succeeded")); | 519 | cFYI(1, "posix reopen succeeded"); |
520 | goto reopen_success; | 520 | goto reopen_success; |
521 | } | 521 | } |
522 | /* fallthrough to retry open the old way on errors, especially | 522 | /* fallthrough to retry open the old way on errors, especially |
@@ -537,8 +537,8 @@ reopen_error_exit: | |||
537 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 537 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
538 | if (rc) { | 538 | if (rc) { |
539 | mutex_unlock(&pCifsFile->fh_mutex); | 539 | mutex_unlock(&pCifsFile->fh_mutex); |
540 | cFYI(1, ("cifs_open returned 0x%x", rc)); | 540 | cFYI(1, "cifs_open returned 0x%x", rc); |
541 | cFYI(1, ("oplock: %d", oplock)); | 541 | cFYI(1, "oplock: %d", oplock); |
542 | } else { | 542 | } else { |
543 | reopen_success: | 543 | reopen_success: |
544 | pCifsFile->netfid = netfid; | 544 | pCifsFile->netfid = netfid; |
@@ -570,8 +570,8 @@ reopen_success: | |||
570 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { | 570 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { |
571 | pCifsInode->clientCanCacheAll = true; | 571 | pCifsInode->clientCanCacheAll = true; |
572 | pCifsInode->clientCanCacheRead = true; | 572 | pCifsInode->clientCanCacheRead = true; |
573 | cFYI(1, ("Exclusive Oplock granted on inode %p", | 573 | cFYI(1, "Exclusive Oplock granted on inode %p", |
574 | file->f_path.dentry->d_inode)); | 574 | file->f_path.dentry->d_inode); |
575 | } else if ((oplock & 0xF) == OPLOCK_READ) { | 575 | } else if ((oplock & 0xF) == OPLOCK_READ) { |
576 | pCifsInode->clientCanCacheRead = true; | 576 | pCifsInode->clientCanCacheRead = true; |
577 | pCifsInode->clientCanCacheAll = false; | 577 | pCifsInode->clientCanCacheAll = false; |
@@ -619,8 +619,7 @@ int cifs_close(struct inode *inode, struct file *file) | |||
619 | the struct would be in each open file, | 619 | the struct would be in each open file, |
620 | but this should give enough time to | 620 | but this should give enough time to |
621 | clear the socket */ | 621 | clear the socket */ |
622 | cFYI(DBG2, | 622 | cFYI(DBG2, "close delay, write pending"); |
623 | ("close delay, write pending")); | ||
624 | msleep(timeout); | 623 | msleep(timeout); |
625 | timeout *= 4; | 624 | timeout *= 4; |
626 | } | 625 | } |
@@ -653,7 +652,7 @@ int cifs_close(struct inode *inode, struct file *file) | |||
653 | 652 | ||
654 | read_lock(&GlobalSMBSeslock); | 653 | read_lock(&GlobalSMBSeslock); |
655 | if (list_empty(&(CIFS_I(inode)->openFileList))) { | 654 | if (list_empty(&(CIFS_I(inode)->openFileList))) { |
656 | cFYI(1, ("closing last open instance for inode %p", inode)); | 655 | cFYI(1, "closing last open instance for inode %p", inode); |
657 | /* if the file is not open we do not know if we can cache info | 656 | /* if the file is not open we do not know if we can cache info |
658 | on this inode, much less write behind and read ahead */ | 657 | on this inode, much less write behind and read ahead */ |
659 | CIFS_I(inode)->clientCanCacheRead = false; | 658 | CIFS_I(inode)->clientCanCacheRead = false; |
@@ -674,7 +673,7 @@ int cifs_closedir(struct inode *inode, struct file *file) | |||
674 | (struct cifsFileInfo *)file->private_data; | 673 | (struct cifsFileInfo *)file->private_data; |
675 | char *ptmp; | 674 | char *ptmp; |
676 | 675 | ||
677 | cFYI(1, ("Closedir inode = 0x%p", inode)); | 676 | cFYI(1, "Closedir inode = 0x%p", inode); |
678 | 677 | ||
679 | xid = GetXid(); | 678 | xid = GetXid(); |
680 | 679 | ||
@@ -685,22 +684,22 @@ int cifs_closedir(struct inode *inode, struct file *file) | |||
685 | 684 | ||
686 | pTcon = cifs_sb->tcon; | 685 | pTcon = cifs_sb->tcon; |
687 | 686 | ||
688 | cFYI(1, ("Freeing private data in close dir")); | 687 | cFYI(1, "Freeing private data in close dir"); |
689 | write_lock(&GlobalSMBSeslock); | 688 | write_lock(&GlobalSMBSeslock); |
690 | if (!pCFileStruct->srch_inf.endOfSearch && | 689 | if (!pCFileStruct->srch_inf.endOfSearch && |
691 | !pCFileStruct->invalidHandle) { | 690 | !pCFileStruct->invalidHandle) { |
692 | pCFileStruct->invalidHandle = true; | 691 | pCFileStruct->invalidHandle = true; |
693 | write_unlock(&GlobalSMBSeslock); | 692 | write_unlock(&GlobalSMBSeslock); |
694 | rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid); | 693 | rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid); |
695 | cFYI(1, ("Closing uncompleted readdir with rc %d", | 694 | cFYI(1, "Closing uncompleted readdir with rc %d", |
696 | rc)); | 695 | rc); |
697 | /* not much we can do if it fails anyway, ignore rc */ | 696 | /* not much we can do if it fails anyway, ignore rc */ |
698 | rc = 0; | 697 | rc = 0; |
699 | } else | 698 | } else |
700 | write_unlock(&GlobalSMBSeslock); | 699 | write_unlock(&GlobalSMBSeslock); |
701 | ptmp = pCFileStruct->srch_inf.ntwrk_buf_start; | 700 | ptmp = pCFileStruct->srch_inf.ntwrk_buf_start; |
702 | if (ptmp) { | 701 | if (ptmp) { |
703 | cFYI(1, ("closedir free smb buf in srch struct")); | 702 | cFYI(1, "closedir free smb buf in srch struct"); |
704 | pCFileStruct->srch_inf.ntwrk_buf_start = NULL; | 703 | pCFileStruct->srch_inf.ntwrk_buf_start = NULL; |
705 | if (pCFileStruct->srch_inf.smallBuf) | 704 | if (pCFileStruct->srch_inf.smallBuf) |
706 | cifs_small_buf_release(ptmp); | 705 | cifs_small_buf_release(ptmp); |
@@ -748,49 +747,49 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
748 | rc = -EACCES; | 747 | rc = -EACCES; |
749 | xid = GetXid(); | 748 | xid = GetXid(); |
750 | 749 | ||
751 | cFYI(1, ("Lock parm: 0x%x flockflags: " | 750 | cFYI(1, "Lock parm: 0x%x flockflags: " |
752 | "0x%x flocktype: 0x%x start: %lld end: %lld", | 751 | "0x%x flocktype: 0x%x start: %lld end: %lld", |
753 | cmd, pfLock->fl_flags, pfLock->fl_type, pfLock->fl_start, | 752 | cmd, pfLock->fl_flags, pfLock->fl_type, pfLock->fl_start, |
754 | pfLock->fl_end)); | 753 | pfLock->fl_end); |
755 | 754 | ||
756 | if (pfLock->fl_flags & FL_POSIX) | 755 | if (pfLock->fl_flags & FL_POSIX) |
757 | cFYI(1, ("Posix")); | 756 | cFYI(1, "Posix"); |
758 | if (pfLock->fl_flags & FL_FLOCK) | 757 | if (pfLock->fl_flags & FL_FLOCK) |
759 | cFYI(1, ("Flock")); | 758 | cFYI(1, "Flock"); |
760 | if (pfLock->fl_flags & FL_SLEEP) { | 759 | if (pfLock->fl_flags & FL_SLEEP) { |
761 | cFYI(1, ("Blocking lock")); | 760 | cFYI(1, "Blocking lock"); |
762 | wait_flag = true; | 761 | wait_flag = true; |
763 | } | 762 | } |
764 | if (pfLock->fl_flags & FL_ACCESS) | 763 | if (pfLock->fl_flags & FL_ACCESS) |
765 | cFYI(1, ("Process suspended by mandatory locking - " | 764 | cFYI(1, "Process suspended by mandatory locking - " |
766 | "not implemented yet")); | 765 | "not implemented yet"); |
767 | if (pfLock->fl_flags & FL_LEASE) | 766 | if (pfLock->fl_flags & FL_LEASE) |
768 | cFYI(1, ("Lease on file - not implemented yet")); | 767 | cFYI(1, "Lease on file - not implemented yet"); |
769 | if (pfLock->fl_flags & | 768 | if (pfLock->fl_flags & |
770 | (~(FL_POSIX | FL_FLOCK | FL_SLEEP | FL_ACCESS | FL_LEASE))) | 769 | (~(FL_POSIX | FL_FLOCK | FL_SLEEP | FL_ACCESS | FL_LEASE))) |
771 | cFYI(1, ("Unknown lock flags 0x%x", pfLock->fl_flags)); | 770 | cFYI(1, "Unknown lock flags 0x%x", pfLock->fl_flags); |
772 | 771 | ||
773 | if (pfLock->fl_type == F_WRLCK) { | 772 | if (pfLock->fl_type == F_WRLCK) { |
774 | cFYI(1, ("F_WRLCK ")); | 773 | cFYI(1, "F_WRLCK "); |
775 | numLock = 1; | 774 | numLock = 1; |
776 | } else if (pfLock->fl_type == F_UNLCK) { | 775 | } else if (pfLock->fl_type == F_UNLCK) { |
777 | cFYI(1, ("F_UNLCK")); | 776 | cFYI(1, "F_UNLCK"); |
778 | numUnlock = 1; | 777 | numUnlock = 1; |
779 | /* Check if unlock includes more than | 778 | /* Check if unlock includes more than |
780 | one lock range */ | 779 | one lock range */ |
781 | } else if (pfLock->fl_type == F_RDLCK) { | 780 | } else if (pfLock->fl_type == F_RDLCK) { |
782 | cFYI(1, ("F_RDLCK")); | 781 | cFYI(1, "F_RDLCK"); |
783 | lockType |= LOCKING_ANDX_SHARED_LOCK; | 782 | lockType |= LOCKING_ANDX_SHARED_LOCK; |
784 | numLock = 1; | 783 | numLock = 1; |
785 | } else if (pfLock->fl_type == F_EXLCK) { | 784 | } else if (pfLock->fl_type == F_EXLCK) { |
786 | cFYI(1, ("F_EXLCK")); | 785 | cFYI(1, "F_EXLCK"); |
787 | numLock = 1; | 786 | numLock = 1; |
788 | } else if (pfLock->fl_type == F_SHLCK) { | 787 | } else if (pfLock->fl_type == F_SHLCK) { |
789 | cFYI(1, ("F_SHLCK")); | 788 | cFYI(1, "F_SHLCK"); |
790 | lockType |= LOCKING_ANDX_SHARED_LOCK; | 789 | lockType |= LOCKING_ANDX_SHARED_LOCK; |
791 | numLock = 1; | 790 | numLock = 1; |
792 | } else | 791 | } else |
793 | cFYI(1, ("Unknown type of lock")); | 792 | cFYI(1, "Unknown type of lock"); |
794 | 793 | ||
795 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); | 794 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
796 | tcon = cifs_sb->tcon; | 795 | tcon = cifs_sb->tcon; |
@@ -833,8 +832,8 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
833 | 0 /* wait flag */ ); | 832 | 0 /* wait flag */ ); |
834 | pfLock->fl_type = F_UNLCK; | 833 | pfLock->fl_type = F_UNLCK; |
835 | if (rc != 0) | 834 | if (rc != 0) |
836 | cERROR(1, ("Error unlocking previously locked " | 835 | cERROR(1, "Error unlocking previously locked " |
837 | "range %d during test of lock", rc)); | 836 | "range %d during test of lock", rc); |
838 | rc = 0; | 837 | rc = 0; |
839 | 838 | ||
840 | } else { | 839 | } else { |
@@ -988,9 +987,8 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, | |||
988 | 987 | ||
989 | pTcon = cifs_sb->tcon; | 988 | pTcon = cifs_sb->tcon; |
990 | 989 | ||
991 | /* cFYI(1, | 990 | /* cFYI(1, " write %d bytes to offset %lld of %s", write_size, |
992 | (" write %d bytes to offset %lld of %s", write_size, | 991 | *poffset, file->f_path.dentry->d_name.name); */ |
993 | *poffset, file->f_path.dentry->d_name.name)); */ | ||
994 | 992 | ||
995 | if (file->private_data == NULL) | 993 | if (file->private_data == NULL) |
996 | return -EBADF; | 994 | return -EBADF; |
@@ -1091,8 +1089,8 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
1091 | 1089 | ||
1092 | pTcon = cifs_sb->tcon; | 1090 | pTcon = cifs_sb->tcon; |
1093 | 1091 | ||
1094 | cFYI(1, ("write %zd bytes to offset %lld of %s", write_size, | 1092 | cFYI(1, "write %zd bytes to offset %lld of %s", write_size, |
1095 | *poffset, file->f_path.dentry->d_name.name)); | 1093 | *poffset, file->f_path.dentry->d_name.name); |
1096 | 1094 | ||
1097 | if (file->private_data == NULL) | 1095 | if (file->private_data == NULL) |
1098 | return -EBADF; | 1096 | return -EBADF; |
@@ -1233,7 +1231,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode) | |||
1233 | it being zero) during stress testcases so we need to check for it */ | 1231 | it being zero) during stress testcases so we need to check for it */ |
1234 | 1232 | ||
1235 | if (cifs_inode == NULL) { | 1233 | if (cifs_inode == NULL) { |
1236 | cERROR(1, ("Null inode passed to cifs_writeable_file")); | 1234 | cERROR(1, "Null inode passed to cifs_writeable_file"); |
1237 | dump_stack(); | 1235 | dump_stack(); |
1238 | return NULL; | 1236 | return NULL; |
1239 | } | 1237 | } |
@@ -1277,7 +1275,7 @@ refind_writable: | |||
1277 | again. Note that it would be bad | 1275 | again. Note that it would be bad |
1278 | to hold up writepages here (rather than | 1276 | to hold up writepages here (rather than |
1279 | in caller) with continuous retries */ | 1277 | in caller) with continuous retries */ |
1280 | cFYI(1, ("wp failed on reopen file")); | 1278 | cFYI(1, "wp failed on reopen file"); |
1281 | read_lock(&GlobalSMBSeslock); | 1279 | read_lock(&GlobalSMBSeslock); |
1282 | /* can not use this handle, no write | 1280 | /* can not use this handle, no write |
1283 | pending on this one after all */ | 1281 | pending on this one after all */ |
@@ -1353,7 +1351,7 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to) | |||
1353 | else if (bytes_written < 0) | 1351 | else if (bytes_written < 0) |
1354 | rc = bytes_written; | 1352 | rc = bytes_written; |
1355 | } else { | 1353 | } else { |
1356 | cFYI(1, ("No writeable filehandles for inode")); | 1354 | cFYI(1, "No writeable filehandles for inode"); |
1357 | rc = -EIO; | 1355 | rc = -EIO; |
1358 | } | 1356 | } |
1359 | 1357 | ||
@@ -1525,7 +1523,7 @@ retry: | |||
1525 | */ | 1523 | */ |
1526 | open_file = find_writable_file(CIFS_I(mapping->host)); | 1524 | open_file = find_writable_file(CIFS_I(mapping->host)); |
1527 | if (!open_file) { | 1525 | if (!open_file) { |
1528 | cERROR(1, ("No writable handles for inode")); | 1526 | cERROR(1, "No writable handles for inode"); |
1529 | rc = -EBADF; | 1527 | rc = -EBADF; |
1530 | } else { | 1528 | } else { |
1531 | long_op = cifs_write_timeout(cifsi, offset); | 1529 | long_op = cifs_write_timeout(cifsi, offset); |
@@ -1538,8 +1536,8 @@ retry: | |||
1538 | cifs_update_eof(cifsi, offset, bytes_written); | 1536 | cifs_update_eof(cifsi, offset, bytes_written); |
1539 | 1537 | ||
1540 | if (rc || bytes_written < bytes_to_write) { | 1538 | if (rc || bytes_written < bytes_to_write) { |
1541 | cERROR(1, ("Write2 ret %d, wrote %d", | 1539 | cERROR(1, "Write2 ret %d, wrote %d", |
1542 | rc, bytes_written)); | 1540 | rc, bytes_written); |
1543 | /* BB what if continued retry is | 1541 | /* BB what if continued retry is |
1544 | requested via mount flags? */ | 1542 | requested via mount flags? */ |
1545 | if (rc == -ENOSPC) | 1543 | if (rc == -ENOSPC) |
@@ -1600,7 +1598,7 @@ static int cifs_writepage(struct page *page, struct writeback_control *wbc) | |||
1600 | /* BB add check for wbc flags */ | 1598 | /* BB add check for wbc flags */ |
1601 | page_cache_get(page); | 1599 | page_cache_get(page); |
1602 | if (!PageUptodate(page)) | 1600 | if (!PageUptodate(page)) |
1603 | cFYI(1, ("ppw - page not up to date")); | 1601 | cFYI(1, "ppw - page not up to date"); |
1604 | 1602 | ||
1605 | /* | 1603 | /* |
1606 | * Set the "writeback" flag, and clear "dirty" in the radix tree. | 1604 | * Set the "writeback" flag, and clear "dirty" in the radix tree. |
@@ -1629,8 +1627,8 @@ static int cifs_write_end(struct file *file, struct address_space *mapping, | |||
1629 | int rc; | 1627 | int rc; |
1630 | struct inode *inode = mapping->host; | 1628 | struct inode *inode = mapping->host; |
1631 | 1629 | ||
1632 | cFYI(1, ("write_end for page %p from pos %lld with %d bytes", | 1630 | cFYI(1, "write_end for page %p from pos %lld with %d bytes", |
1633 | page, pos, copied)); | 1631 | page, pos, copied); |
1634 | 1632 | ||
1635 | if (PageChecked(page)) { | 1633 | if (PageChecked(page)) { |
1636 | if (copied == len) | 1634 | if (copied == len) |
@@ -1686,8 +1684,8 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1686 | 1684 | ||
1687 | xid = GetXid(); | 1685 | xid = GetXid(); |
1688 | 1686 | ||
1689 | cFYI(1, ("Sync file - name: %s datasync: 0x%x", | 1687 | cFYI(1, "Sync file - name: %s datasync: 0x%x", |
1690 | dentry->d_name.name, datasync)); | 1688 | dentry->d_name.name, datasync); |
1691 | 1689 | ||
1692 | rc = filemap_write_and_wait(inode->i_mapping); | 1690 | rc = filemap_write_and_wait(inode->i_mapping); |
1693 | if (rc == 0) { | 1691 | if (rc == 0) { |
@@ -1711,7 +1709,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1711 | unsigned int rpages = 0; | 1709 | unsigned int rpages = 0; |
1712 | int rc = 0; | 1710 | int rc = 0; |
1713 | 1711 | ||
1714 | cFYI(1, ("sync page %p",page)); | 1712 | cFYI(1, "sync page %p",page); |
1715 | mapping = page->mapping; | 1713 | mapping = page->mapping; |
1716 | if (!mapping) | 1714 | if (!mapping) |
1717 | return 0; | 1715 | return 0; |
@@ -1722,7 +1720,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1722 | /* fill in rpages then | 1720 | /* fill in rpages then |
1723 | result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ | 1721 | result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ |
1724 | 1722 | ||
1725 | /* cFYI(1, ("rpages is %d for sync page of Index %ld", rpages, index)); | 1723 | /* cFYI(1, "rpages is %d for sync page of Index %ld", rpages, index); |
1726 | 1724 | ||
1727 | #if 0 | 1725 | #if 0 |
1728 | if (rc < 0) | 1726 | if (rc < 0) |
@@ -1756,7 +1754,7 @@ int cifs_flush(struct file *file, fl_owner_t id) | |||
1756 | CIFS_I(inode)->write_behind_rc = 0; | 1754 | CIFS_I(inode)->write_behind_rc = 0; |
1757 | } | 1755 | } |
1758 | 1756 | ||
1759 | cFYI(1, ("Flush inode %p file %p rc %d", inode, file, rc)); | 1757 | cFYI(1, "Flush inode %p file %p rc %d", inode, file, rc); |
1760 | 1758 | ||
1761 | return rc; | 1759 | return rc; |
1762 | } | 1760 | } |
@@ -1788,7 +1786,7 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data, | |||
1788 | open_file = (struct cifsFileInfo *)file->private_data; | 1786 | open_file = (struct cifsFileInfo *)file->private_data; |
1789 | 1787 | ||
1790 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) | 1788 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) |
1791 | cFYI(1, ("attempting read on write only file instance")); | 1789 | cFYI(1, "attempting read on write only file instance"); |
1792 | 1790 | ||
1793 | for (total_read = 0, current_offset = read_data; | 1791 | for (total_read = 0, current_offset = read_data; |
1794 | read_size > total_read; | 1792 | read_size > total_read; |
@@ -1869,7 +1867,7 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, | |||
1869 | open_file = (struct cifsFileInfo *)file->private_data; | 1867 | open_file = (struct cifsFileInfo *)file->private_data; |
1870 | 1868 | ||
1871 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) | 1869 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) |
1872 | cFYI(1, ("attempting read on write only file instance")); | 1870 | cFYI(1, "attempting read on write only file instance"); |
1873 | 1871 | ||
1874 | for (total_read = 0, current_offset = read_data; | 1872 | for (total_read = 0, current_offset = read_data; |
1875 | read_size > total_read; | 1873 | read_size > total_read; |
@@ -1920,7 +1918,7 @@ int cifs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
1920 | xid = GetXid(); | 1918 | xid = GetXid(); |
1921 | rc = cifs_revalidate_file(file); | 1919 | rc = cifs_revalidate_file(file); |
1922 | if (rc) { | 1920 | if (rc) { |
1923 | cFYI(1, ("Validation prior to mmap failed, error=%d", rc)); | 1921 | cFYI(1, "Validation prior to mmap failed, error=%d", rc); |
1924 | FreeXid(xid); | 1922 | FreeXid(xid); |
1925 | return rc; | 1923 | return rc; |
1926 | } | 1924 | } |
@@ -1946,7 +1944,7 @@ static void cifs_copy_cache_pages(struct address_space *mapping, | |||
1946 | if (add_to_page_cache_lru(page, mapping, page->index, | 1944 | if (add_to_page_cache_lru(page, mapping, page->index, |
1947 | GFP_KERNEL)) { | 1945 | GFP_KERNEL)) { |
1948 | page_cache_release(page); | 1946 | page_cache_release(page); |
1949 | cFYI(1, ("Add page cache failed")); | 1947 | cFYI(1, "Add page cache failed"); |
1950 | data += PAGE_CACHE_SIZE; | 1948 | data += PAGE_CACHE_SIZE; |
1951 | bytes_read -= PAGE_CACHE_SIZE; | 1949 | bytes_read -= PAGE_CACHE_SIZE; |
1952 | continue; | 1950 | continue; |
@@ -2033,8 +2031,8 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
2033 | /* Read size needs to be in multiples of one page */ | 2031 | /* Read size needs to be in multiples of one page */ |
2034 | read_size = min_t(const unsigned int, read_size, | 2032 | read_size = min_t(const unsigned int, read_size, |
2035 | cifs_sb->rsize & PAGE_CACHE_MASK); | 2033 | cifs_sb->rsize & PAGE_CACHE_MASK); |
2036 | cFYI(DBG2, ("rpages: read size 0x%x contiguous pages %d", | 2034 | cFYI(DBG2, "rpages: read size 0x%x contiguous pages %d", |
2037 | read_size, contig_pages)); | 2035 | read_size, contig_pages); |
2038 | rc = -EAGAIN; | 2036 | rc = -EAGAIN; |
2039 | while (rc == -EAGAIN) { | 2037 | while (rc == -EAGAIN) { |
2040 | if ((open_file->invalidHandle) && | 2038 | if ((open_file->invalidHandle) && |
@@ -2061,7 +2059,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
2061 | } | 2059 | } |
2062 | } | 2060 | } |
2063 | if ((rc < 0) || (smb_read_data == NULL)) { | 2061 | if ((rc < 0) || (smb_read_data == NULL)) { |
2064 | cFYI(1, ("Read error in readpages: %d", rc)); | 2062 | cFYI(1, "Read error in readpages: %d", rc); |
2065 | break; | 2063 | break; |
2066 | } else if (bytes_read > 0) { | 2064 | } else if (bytes_read > 0) { |
2067 | task_io_account_read(bytes_read); | 2065 | task_io_account_read(bytes_read); |
@@ -2084,9 +2082,9 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
2084 | /* break; */ | 2082 | /* break; */ |
2085 | } | 2083 | } |
2086 | } else { | 2084 | } else { |
2087 | cFYI(1, ("No bytes read (%d) at offset %lld . " | 2085 | cFYI(1, "No bytes read (%d) at offset %lld . " |
2088 | "Cleaning remaining pages from readahead list", | 2086 | "Cleaning remaining pages from readahead list", |
2089 | bytes_read, offset)); | 2087 | bytes_read, offset); |
2090 | /* BB turn off caching and do new lookup on | 2088 | /* BB turn off caching and do new lookup on |
2091 | file size at server? */ | 2089 | file size at server? */ |
2092 | break; | 2090 | break; |
@@ -2129,7 +2127,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page, | |||
2129 | if (rc < 0) | 2127 | if (rc < 0) |
2130 | goto io_error; | 2128 | goto io_error; |
2131 | else | 2129 | else |
2132 | cFYI(1, ("Bytes read %d", rc)); | 2130 | cFYI(1, "Bytes read %d", rc); |
2133 | 2131 | ||
2134 | file->f_path.dentry->d_inode->i_atime = | 2132 | file->f_path.dentry->d_inode->i_atime = |
2135 | current_fs_time(file->f_path.dentry->d_inode->i_sb); | 2133 | current_fs_time(file->f_path.dentry->d_inode->i_sb); |
@@ -2161,8 +2159,8 @@ static int cifs_readpage(struct file *file, struct page *page) | |||
2161 | return rc; | 2159 | return rc; |
2162 | } | 2160 | } |
2163 | 2161 | ||
2164 | cFYI(1, ("readpage %p at offset %d 0x%x\n", | 2162 | cFYI(1, "readpage %p at offset %d 0x%x\n", |
2165 | page, (int)offset, (int)offset)); | 2163 | page, (int)offset, (int)offset); |
2166 | 2164 | ||
2167 | rc = cifs_readpage_worker(file, page, &offset); | 2165 | rc = cifs_readpage_worker(file, page, &offset); |
2168 | 2166 | ||
@@ -2232,7 +2230,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping, | |||
2232 | struct page *page; | 2230 | struct page *page; |
2233 | int rc = 0; | 2231 | int rc = 0; |
2234 | 2232 | ||
2235 | cFYI(1, ("write_begin from %lld len %d", (long long)pos, len)); | 2233 | cFYI(1, "write_begin from %lld len %d", (long long)pos, len); |
2236 | 2234 | ||
2237 | page = grab_cache_page_write_begin(mapping, index, flags); | 2235 | page = grab_cache_page_write_begin(mapping, index, flags); |
2238 | if (!page) { | 2236 | if (!page) { |
@@ -2319,7 +2317,7 @@ cifs_oplock_break(struct slow_work *work) | |||
2319 | rc = waitrc; | 2317 | rc = waitrc; |
2320 | if (rc) | 2318 | if (rc) |
2321 | cinode->write_behind_rc = rc; | 2319 | cinode->write_behind_rc = rc; |
2322 | cFYI(1, ("Oplock flush inode %p rc %d", inode, rc)); | 2320 | cFYI(1, "Oplock flush inode %p rc %d", inode, rc); |
2323 | } | 2321 | } |
2324 | 2322 | ||
2325 | /* | 2323 | /* |
@@ -2331,7 +2329,7 @@ cifs_oplock_break(struct slow_work *work) | |||
2331 | if (!cfile->closePend && !cfile->oplock_break_cancelled) { | 2329 | if (!cfile->closePend && !cfile->oplock_break_cancelled) { |
2332 | rc = CIFSSMBLock(0, cifs_sb->tcon, cfile->netfid, 0, 0, 0, 0, | 2330 | rc = CIFSSMBLock(0, cifs_sb->tcon, cfile->netfid, 0, 0, 0, 0, |
2333 | LOCKING_ANDX_OPLOCK_RELEASE, false); | 2331 | LOCKING_ANDX_OPLOCK_RELEASE, false); |
2334 | cFYI(1, ("Oplock release rc = %d", rc)); | 2332 | cFYI(1, "Oplock release rc = %d", rc); |
2335 | } | 2333 | } |
2336 | } | 2334 | } |
2337 | 2335 | ||
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 35ec11716213..7524a90aa94f 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -144,8 +144,8 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr) | |||
144 | else | 144 | else |
145 | cifs_i->time = jiffies; | 145 | cifs_i->time = jiffies; |
146 | 146 | ||
147 | cFYI(1, ("inode 0x%p old_time=%ld new_time=%ld", inode, | 147 | cFYI(1, "inode 0x%p old_time=%ld new_time=%ld", inode, |
148 | oldtime, cifs_i->time)); | 148 | oldtime, cifs_i->time); |
149 | 149 | ||
150 | cifs_i->delete_pending = fattr->cf_flags & CIFS_FATTR_DELETE_PENDING; | 150 | cifs_i->delete_pending = fattr->cf_flags & CIFS_FATTR_DELETE_PENDING; |
151 | 151 | ||
@@ -227,7 +227,7 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info, | |||
227 | /* safest to call it a file if we do not know */ | 227 | /* safest to call it a file if we do not know */ |
228 | fattr->cf_mode |= S_IFREG; | 228 | fattr->cf_mode |= S_IFREG; |
229 | fattr->cf_dtype = DT_REG; | 229 | fattr->cf_dtype = DT_REG; |
230 | cFYI(1, ("unknown type %d", le32_to_cpu(info->Type))); | 230 | cFYI(1, "unknown type %d", le32_to_cpu(info->Type)); |
231 | break; | 231 | break; |
232 | } | 232 | } |
233 | 233 | ||
@@ -256,7 +256,7 @@ cifs_create_dfs_fattr(struct cifs_fattr *fattr, struct super_block *sb) | |||
256 | { | 256 | { |
257 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | 257 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); |
258 | 258 | ||
259 | cFYI(1, ("creating fake fattr for DFS referral")); | 259 | cFYI(1, "creating fake fattr for DFS referral"); |
260 | 260 | ||
261 | memset(fattr, 0, sizeof(*fattr)); | 261 | memset(fattr, 0, sizeof(*fattr)); |
262 | fattr->cf_mode = S_IFDIR | S_IXUGO | S_IRWXU; | 262 | fattr->cf_mode = S_IFDIR | S_IXUGO | S_IRWXU; |
@@ -305,7 +305,7 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
305 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | 305 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); |
306 | 306 | ||
307 | tcon = cifs_sb->tcon; | 307 | tcon = cifs_sb->tcon; |
308 | cFYI(1, ("Getting info on %s", full_path)); | 308 | cFYI(1, "Getting info on %s", full_path); |
309 | 309 | ||
310 | /* could have done a find first instead but this returns more info */ | 310 | /* could have done a find first instead but this returns more info */ |
311 | rc = CIFSSMBUnixQPathInfo(xid, tcon, full_path, &find_data, | 311 | rc = CIFSSMBUnixQPathInfo(xid, tcon, full_path, &find_data, |
@@ -373,7 +373,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const unsigned char *path, | |||
373 | &bytes_read, &pbuf, &buf_type); | 373 | &bytes_read, &pbuf, &buf_type); |
374 | if ((rc == 0) && (bytes_read >= 8)) { | 374 | if ((rc == 0) && (bytes_read >= 8)) { |
375 | if (memcmp("IntxBLK", pbuf, 8) == 0) { | 375 | if (memcmp("IntxBLK", pbuf, 8) == 0) { |
376 | cFYI(1, ("Block device")); | 376 | cFYI(1, "Block device"); |
377 | fattr->cf_mode |= S_IFBLK; | 377 | fattr->cf_mode |= S_IFBLK; |
378 | fattr->cf_dtype = DT_BLK; | 378 | fattr->cf_dtype = DT_BLK; |
379 | if (bytes_read == 24) { | 379 | if (bytes_read == 24) { |
@@ -385,7 +385,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const unsigned char *path, | |||
385 | fattr->cf_rdev = MKDEV(mjr, mnr); | 385 | fattr->cf_rdev = MKDEV(mjr, mnr); |
386 | } | 386 | } |
387 | } else if (memcmp("IntxCHR", pbuf, 8) == 0) { | 387 | } else if (memcmp("IntxCHR", pbuf, 8) == 0) { |
388 | cFYI(1, ("Char device")); | 388 | cFYI(1, "Char device"); |
389 | fattr->cf_mode |= S_IFCHR; | 389 | fattr->cf_mode |= S_IFCHR; |
390 | fattr->cf_dtype = DT_CHR; | 390 | fattr->cf_dtype = DT_CHR; |
391 | if (bytes_read == 24) { | 391 | if (bytes_read == 24) { |
@@ -397,7 +397,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const unsigned char *path, | |||
397 | fattr->cf_rdev = MKDEV(mjr, mnr); | 397 | fattr->cf_rdev = MKDEV(mjr, mnr); |
398 | } | 398 | } |
399 | } else if (memcmp("IntxLNK", pbuf, 7) == 0) { | 399 | } else if (memcmp("IntxLNK", pbuf, 7) == 0) { |
400 | cFYI(1, ("Symlink")); | 400 | cFYI(1, "Symlink"); |
401 | fattr->cf_mode |= S_IFLNK; | 401 | fattr->cf_mode |= S_IFLNK; |
402 | fattr->cf_dtype = DT_LNK; | 402 | fattr->cf_dtype = DT_LNK; |
403 | } else { | 403 | } else { |
@@ -439,10 +439,10 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path, | |||
439 | else if (rc > 3) { | 439 | else if (rc > 3) { |
440 | mode = le32_to_cpu(*((__le32 *)ea_value)); | 440 | mode = le32_to_cpu(*((__le32 *)ea_value)); |
441 | fattr->cf_mode &= ~SFBITS_MASK; | 441 | fattr->cf_mode &= ~SFBITS_MASK; |
442 | cFYI(1, ("special bits 0%o org mode 0%o", mode, | 442 | cFYI(1, "special bits 0%o org mode 0%o", mode, |
443 | fattr->cf_mode)); | 443 | fattr->cf_mode); |
444 | fattr->cf_mode = (mode & SFBITS_MASK) | fattr->cf_mode; | 444 | fattr->cf_mode = (mode & SFBITS_MASK) | fattr->cf_mode; |
445 | cFYI(1, ("special mode bits 0%o", mode)); | 445 | cFYI(1, "special mode bits 0%o", mode); |
446 | } | 446 | } |
447 | 447 | ||
448 | return 0; | 448 | return 0; |
@@ -548,11 +548,11 @@ int cifs_get_inode_info(struct inode **pinode, | |||
548 | struct cifs_fattr fattr; | 548 | struct cifs_fattr fattr; |
549 | 549 | ||
550 | pTcon = cifs_sb->tcon; | 550 | pTcon = cifs_sb->tcon; |
551 | cFYI(1, ("Getting info on %s", full_path)); | 551 | cFYI(1, "Getting info on %s", full_path); |
552 | 552 | ||
553 | if ((pfindData == NULL) && (*pinode != NULL)) { | 553 | if ((pfindData == NULL) && (*pinode != NULL)) { |
554 | if (CIFS_I(*pinode)->clientCanCacheRead) { | 554 | if (CIFS_I(*pinode)->clientCanCacheRead) { |
555 | cFYI(1, ("No need to revalidate cached inode sizes")); | 555 | cFYI(1, "No need to revalidate cached inode sizes"); |
556 | return rc; | 556 | return rc; |
557 | } | 557 | } |
558 | } | 558 | } |
@@ -618,7 +618,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
618 | cifs_sb->mnt_cifs_flags & | 618 | cifs_sb->mnt_cifs_flags & |
619 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 619 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
620 | if (rc1 || !fattr.cf_uniqueid) { | 620 | if (rc1 || !fattr.cf_uniqueid) { |
621 | cFYI(1, ("GetSrvInodeNum rc %d", rc1)); | 621 | cFYI(1, "GetSrvInodeNum rc %d", rc1); |
622 | fattr.cf_uniqueid = iunique(sb, ROOT_I); | 622 | fattr.cf_uniqueid = iunique(sb, ROOT_I); |
623 | cifs_autodisable_serverino(cifs_sb); | 623 | cifs_autodisable_serverino(cifs_sb); |
624 | } | 624 | } |
@@ -634,13 +634,13 @@ int cifs_get_inode_info(struct inode **pinode, | |||
634 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) { | 634 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) { |
635 | tmprc = cifs_sfu_type(&fattr, full_path, cifs_sb, xid); | 635 | tmprc = cifs_sfu_type(&fattr, full_path, cifs_sb, xid); |
636 | if (tmprc) | 636 | if (tmprc) |
637 | cFYI(1, ("cifs_sfu_type failed: %d", tmprc)); | 637 | cFYI(1, "cifs_sfu_type failed: %d", tmprc); |
638 | } | 638 | } |
639 | 639 | ||
640 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 640 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
641 | /* fill in 0777 bits from ACL */ | 641 | /* fill in 0777 bits from ACL */ |
642 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { | 642 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { |
643 | cFYI(1, ("Getting mode bits from ACL")); | 643 | cFYI(1, "Getting mode bits from ACL"); |
644 | cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path, pfid); | 644 | cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path, pfid); |
645 | } | 645 | } |
646 | #endif | 646 | #endif |
@@ -734,7 +734,7 @@ cifs_iget(struct super_block *sb, struct cifs_fattr *fattr) | |||
734 | unsigned long hash; | 734 | unsigned long hash; |
735 | struct inode *inode; | 735 | struct inode *inode; |
736 | 736 | ||
737 | cFYI(1, ("looking for uniqueid=%llu", fattr->cf_uniqueid)); | 737 | cFYI(1, "looking for uniqueid=%llu", fattr->cf_uniqueid); |
738 | 738 | ||
739 | /* hash down to 32-bits on 32-bit arch */ | 739 | /* hash down to 32-bits on 32-bit arch */ |
740 | hash = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid); | 740 | hash = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid); |
@@ -780,7 +780,7 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino) | |||
780 | return ERR_PTR(-ENOMEM); | 780 | return ERR_PTR(-ENOMEM); |
781 | 781 | ||
782 | if (rc && cifs_sb->tcon->ipc) { | 782 | if (rc && cifs_sb->tcon->ipc) { |
783 | cFYI(1, ("ipc connection - fake read inode")); | 783 | cFYI(1, "ipc connection - fake read inode"); |
784 | inode->i_mode |= S_IFDIR; | 784 | inode->i_mode |= S_IFDIR; |
785 | inode->i_nlink = 2; | 785 | inode->i_nlink = 2; |
786 | inode->i_op = &cifs_ipc_inode_ops; | 786 | inode->i_op = &cifs_ipc_inode_ops; |
@@ -842,7 +842,7 @@ cifs_set_file_info(struct inode *inode, struct iattr *attrs, int xid, | |||
842 | * server times. | 842 | * server times. |
843 | */ | 843 | */ |
844 | if (set_time && (attrs->ia_valid & ATTR_CTIME)) { | 844 | if (set_time && (attrs->ia_valid & ATTR_CTIME)) { |
845 | cFYI(1, ("CIFS - CTIME changed")); | 845 | cFYI(1, "CIFS - CTIME changed"); |
846 | info_buf.ChangeTime = | 846 | info_buf.ChangeTime = |
847 | cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_ctime)); | 847 | cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_ctime)); |
848 | } else | 848 | } else |
@@ -877,8 +877,8 @@ cifs_set_file_info(struct inode *inode, struct iattr *attrs, int xid, | |||
877 | goto out; | 877 | goto out; |
878 | } | 878 | } |
879 | 879 | ||
880 | cFYI(1, ("calling SetFileInfo since SetPathInfo for " | 880 | cFYI(1, "calling SetFileInfo since SetPathInfo for " |
881 | "times not supported by this server")); | 881 | "times not supported by this server"); |
882 | rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, | 882 | rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, |
883 | SYNCHRONIZE | FILE_WRITE_ATTRIBUTES, | 883 | SYNCHRONIZE | FILE_WRITE_ATTRIBUTES, |
884 | CREATE_NOT_DIR, &netfid, &oplock, | 884 | CREATE_NOT_DIR, &netfid, &oplock, |
@@ -1036,7 +1036,7 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry) | |||
1036 | struct iattr *attrs = NULL; | 1036 | struct iattr *attrs = NULL; |
1037 | __u32 dosattr = 0, origattr = 0; | 1037 | __u32 dosattr = 0, origattr = 0; |
1038 | 1038 | ||
1039 | cFYI(1, ("cifs_unlink, dir=0x%p, dentry=0x%p", dir, dentry)); | 1039 | cFYI(1, "cifs_unlink, dir=0x%p, dentry=0x%p", dir, dentry); |
1040 | 1040 | ||
1041 | xid = GetXid(); | 1041 | xid = GetXid(); |
1042 | 1042 | ||
@@ -1055,7 +1055,7 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry) | |||
1055 | rc = CIFSPOSIXDelFile(xid, tcon, full_path, | 1055 | rc = CIFSPOSIXDelFile(xid, tcon, full_path, |
1056 | SMB_POSIX_UNLINK_FILE_TARGET, cifs_sb->local_nls, | 1056 | SMB_POSIX_UNLINK_FILE_TARGET, cifs_sb->local_nls, |
1057 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 1057 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1058 | cFYI(1, ("posix del rc %d", rc)); | 1058 | cFYI(1, "posix del rc %d", rc); |
1059 | if ((rc == 0) || (rc == -ENOENT)) | 1059 | if ((rc == 0) || (rc == -ENOENT)) |
1060 | goto psx_del_no_retry; | 1060 | goto psx_del_no_retry; |
1061 | } | 1061 | } |
@@ -1129,7 +1129,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
1129 | struct inode *newinode = NULL; | 1129 | struct inode *newinode = NULL; |
1130 | struct cifs_fattr fattr; | 1130 | struct cifs_fattr fattr; |
1131 | 1131 | ||
1132 | cFYI(1, ("In cifs_mkdir, mode = 0x%x inode = 0x%p", mode, inode)); | 1132 | cFYI(1, "In cifs_mkdir, mode = 0x%x inode = 0x%p", mode, inode); |
1133 | 1133 | ||
1134 | xid = GetXid(); | 1134 | xid = GetXid(); |
1135 | 1135 | ||
@@ -1164,7 +1164,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
1164 | kfree(pInfo); | 1164 | kfree(pInfo); |
1165 | goto mkdir_retry_old; | 1165 | goto mkdir_retry_old; |
1166 | } else if (rc) { | 1166 | } else if (rc) { |
1167 | cFYI(1, ("posix mkdir returned 0x%x", rc)); | 1167 | cFYI(1, "posix mkdir returned 0x%x", rc); |
1168 | d_drop(direntry); | 1168 | d_drop(direntry); |
1169 | } else { | 1169 | } else { |
1170 | if (pInfo->Type == cpu_to_le32(-1)) { | 1170 | if (pInfo->Type == cpu_to_le32(-1)) { |
@@ -1190,12 +1190,12 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
1190 | d_instantiate(direntry, newinode); | 1190 | d_instantiate(direntry, newinode); |
1191 | 1191 | ||
1192 | #ifdef CONFIG_CIFS_DEBUG2 | 1192 | #ifdef CONFIG_CIFS_DEBUG2 |
1193 | cFYI(1, ("instantiated dentry %p %s to inode %p", | 1193 | cFYI(1, "instantiated dentry %p %s to inode %p", |
1194 | direntry, direntry->d_name.name, newinode)); | 1194 | direntry, direntry->d_name.name, newinode); |
1195 | 1195 | ||
1196 | if (newinode->i_nlink != 2) | 1196 | if (newinode->i_nlink != 2) |
1197 | cFYI(1, ("unexpected number of links %d", | 1197 | cFYI(1, "unexpected number of links %d", |
1198 | newinode->i_nlink)); | 1198 | newinode->i_nlink); |
1199 | #endif | 1199 | #endif |
1200 | } | 1200 | } |
1201 | kfree(pInfo); | 1201 | kfree(pInfo); |
@@ -1206,7 +1206,7 @@ mkdir_retry_old: | |||
1206 | rc = CIFSSMBMkDir(xid, pTcon, full_path, cifs_sb->local_nls, | 1206 | rc = CIFSSMBMkDir(xid, pTcon, full_path, cifs_sb->local_nls, |
1207 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 1207 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
1208 | if (rc) { | 1208 | if (rc) { |
1209 | cFYI(1, ("cifs_mkdir returned 0x%x", rc)); | 1209 | cFYI(1, "cifs_mkdir returned 0x%x", rc); |
1210 | d_drop(direntry); | 1210 | d_drop(direntry); |
1211 | } else { | 1211 | } else { |
1212 | mkdir_get_info: | 1212 | mkdir_get_info: |
@@ -1309,7 +1309,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) | |||
1309 | char *full_path = NULL; | 1309 | char *full_path = NULL; |
1310 | struct cifsInodeInfo *cifsInode; | 1310 | struct cifsInodeInfo *cifsInode; |
1311 | 1311 | ||
1312 | cFYI(1, ("cifs_rmdir, inode = 0x%p", inode)); | 1312 | cFYI(1, "cifs_rmdir, inode = 0x%p", inode); |
1313 | 1313 | ||
1314 | xid = GetXid(); | 1314 | xid = GetXid(); |
1315 | 1315 | ||
@@ -1673,12 +1673,12 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs, | |||
1673 | rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size, nfid, | 1673 | rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size, nfid, |
1674 | npid, false); | 1674 | npid, false); |
1675 | cifsFileInfo_put(open_file); | 1675 | cifsFileInfo_put(open_file); |
1676 | cFYI(1, ("SetFSize for attrs rc = %d", rc)); | 1676 | cFYI(1, "SetFSize for attrs rc = %d", rc); |
1677 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { | 1677 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { |
1678 | unsigned int bytes_written; | 1678 | unsigned int bytes_written; |
1679 | rc = CIFSSMBWrite(xid, pTcon, nfid, 0, attrs->ia_size, | 1679 | rc = CIFSSMBWrite(xid, pTcon, nfid, 0, attrs->ia_size, |
1680 | &bytes_written, NULL, NULL, 1); | 1680 | &bytes_written, NULL, NULL, 1); |
1681 | cFYI(1, ("Wrt seteof rc %d", rc)); | 1681 | cFYI(1, "Wrt seteof rc %d", rc); |
1682 | } | 1682 | } |
1683 | } else | 1683 | } else |
1684 | rc = -EINVAL; | 1684 | rc = -EINVAL; |
@@ -1692,7 +1692,7 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs, | |||
1692 | false, cifs_sb->local_nls, | 1692 | false, cifs_sb->local_nls, |
1693 | cifs_sb->mnt_cifs_flags & | 1693 | cifs_sb->mnt_cifs_flags & |
1694 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 1694 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
1695 | cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc)); | 1695 | cFYI(1, "SetEOF by path (setattrs) rc = %d", rc); |
1696 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { | 1696 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { |
1697 | __u16 netfid; | 1697 | __u16 netfid; |
1698 | int oplock = 0; | 1698 | int oplock = 0; |
@@ -1709,7 +1709,7 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs, | |||
1709 | attrs->ia_size, | 1709 | attrs->ia_size, |
1710 | &bytes_written, NULL, | 1710 | &bytes_written, NULL, |
1711 | NULL, 1); | 1711 | NULL, 1); |
1712 | cFYI(1, ("wrt seteof rc %d", rc)); | 1712 | cFYI(1, "wrt seteof rc %d", rc); |
1713 | CIFSSMBClose(xid, pTcon, netfid); | 1713 | CIFSSMBClose(xid, pTcon, netfid); |
1714 | } | 1714 | } |
1715 | } | 1715 | } |
@@ -1737,8 +1737,8 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs) | |||
1737 | struct cifs_unix_set_info_args *args = NULL; | 1737 | struct cifs_unix_set_info_args *args = NULL; |
1738 | struct cifsFileInfo *open_file; | 1738 | struct cifsFileInfo *open_file; |
1739 | 1739 | ||
1740 | cFYI(1, ("setattr_unix on file %s attrs->ia_valid=0x%x", | 1740 | cFYI(1, "setattr_unix on file %s attrs->ia_valid=0x%x", |
1741 | direntry->d_name.name, attrs->ia_valid)); | 1741 | direntry->d_name.name, attrs->ia_valid); |
1742 | 1742 | ||
1743 | xid = GetXid(); | 1743 | xid = GetXid(); |
1744 | 1744 | ||
@@ -1868,8 +1868,8 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs) | |||
1868 | 1868 | ||
1869 | xid = GetXid(); | 1869 | xid = GetXid(); |
1870 | 1870 | ||
1871 | cFYI(1, ("setattr on file %s attrs->iavalid 0x%x", | 1871 | cFYI(1, "setattr on file %s attrs->iavalid 0x%x", |
1872 | direntry->d_name.name, attrs->ia_valid)); | 1872 | direntry->d_name.name, attrs->ia_valid); |
1873 | 1873 | ||
1874 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) { | 1874 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) { |
1875 | /* check if we have permission to change attrs */ | 1875 | /* check if we have permission to change attrs */ |
@@ -1926,7 +1926,7 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs) | |||
1926 | attrs->ia_valid &= ~ATTR_MODE; | 1926 | attrs->ia_valid &= ~ATTR_MODE; |
1927 | 1927 | ||
1928 | if (attrs->ia_valid & ATTR_MODE) { | 1928 | if (attrs->ia_valid & ATTR_MODE) { |
1929 | cFYI(1, ("Mode changed to 0%o", attrs->ia_mode)); | 1929 | cFYI(1, "Mode changed to 0%o", attrs->ia_mode); |
1930 | mode = attrs->ia_mode; | 1930 | mode = attrs->ia_mode; |
1931 | } | 1931 | } |
1932 | 1932 | ||
@@ -2012,7 +2012,7 @@ cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
2012 | #if 0 | 2012 | #if 0 |
2013 | void cifs_delete_inode(struct inode *inode) | 2013 | void cifs_delete_inode(struct inode *inode) |
2014 | { | 2014 | { |
2015 | cFYI(1, ("In cifs_delete_inode, inode = 0x%p", inode)); | 2015 | cFYI(1, "In cifs_delete_inode, inode = 0x%p", inode); |
2016 | /* may have to add back in if and when safe distributed caching of | 2016 | /* may have to add back in if and when safe distributed caching of |
2017 | directories added e.g. via FindNotify */ | 2017 | directories added e.g. via FindNotify */ |
2018 | } | 2018 | } |
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index f94650683a00..505926f1ee6b 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
@@ -47,7 +47,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) | |||
47 | 47 | ||
48 | xid = GetXid(); | 48 | xid = GetXid(); |
49 | 49 | ||
50 | cFYI(1, ("ioctl file %p cmd %u arg %lu", filep, command, arg)); | 50 | cFYI(1, "ioctl file %p cmd %u arg %lu", filep, command, arg); |
51 | 51 | ||
52 | cifs_sb = CIFS_SB(inode->i_sb); | 52 | cifs_sb = CIFS_SB(inode->i_sb); |
53 | 53 | ||
@@ -64,12 +64,12 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) | |||
64 | 64 | ||
65 | switch (command) { | 65 | switch (command) { |
66 | case CIFS_IOC_CHECKUMOUNT: | 66 | case CIFS_IOC_CHECKUMOUNT: |
67 | cFYI(1, ("User unmount attempted")); | 67 | cFYI(1, "User unmount attempted"); |
68 | if (cifs_sb->mnt_uid == current_uid()) | 68 | if (cifs_sb->mnt_uid == current_uid()) |
69 | rc = 0; | 69 | rc = 0; |
70 | else { | 70 | else { |
71 | rc = -EACCES; | 71 | rc = -EACCES; |
72 | cFYI(1, ("uids do not match")); | 72 | cFYI(1, "uids do not match"); |
73 | } | 73 | } |
74 | break; | 74 | break; |
75 | #ifdef CONFIG_CIFS_POSIX | 75 | #ifdef CONFIG_CIFS_POSIX |
@@ -97,11 +97,11 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) | |||
97 | /* rc= CIFSGetExtAttr(xid,tcon,pSMBFile->netfid, | 97 | /* rc= CIFSGetExtAttr(xid,tcon,pSMBFile->netfid, |
98 | extAttrBits, &ExtAttrMask);*/ | 98 | extAttrBits, &ExtAttrMask);*/ |
99 | } | 99 | } |
100 | cFYI(1, ("set flags not implemented yet")); | 100 | cFYI(1, "set flags not implemented yet"); |
101 | break; | 101 | break; |
102 | #endif /* CONFIG_CIFS_POSIX */ | 102 | #endif /* CONFIG_CIFS_POSIX */ |
103 | default: | 103 | default: |
104 | cFYI(1, ("unsupported ioctl")); | 104 | cFYI(1, "unsupported ioctl"); |
105 | break; | 105 | break; |
106 | } | 106 | } |
107 | 107 | ||
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index c1a9d4236a8c..473ca8033656 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -139,7 +139,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | |||
139 | if (!full_path) | 139 | if (!full_path) |
140 | goto out; | 140 | goto out; |
141 | 141 | ||
142 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); | 142 | cFYI(1, "Full path: %s inode = 0x%p", full_path, inode); |
143 | 143 | ||
144 | rc = CIFSSMBUnixQuerySymLink(xid, tcon, full_path, &target_path, | 144 | rc = CIFSSMBUnixQuerySymLink(xid, tcon, full_path, &target_path, |
145 | cifs_sb->local_nls); | 145 | cifs_sb->local_nls); |
@@ -178,8 +178,8 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
178 | return rc; | 178 | return rc; |
179 | } | 179 | } |
180 | 180 | ||
181 | cFYI(1, ("Full path: %s", full_path)); | 181 | cFYI(1, "Full path: %s", full_path); |
182 | cFYI(1, ("symname is %s", symname)); | 182 | cFYI(1, "symname is %s", symname); |
183 | 183 | ||
184 | /* BB what if DFS and this volume is on different share? BB */ | 184 | /* BB what if DFS and this volume is on different share? BB */ |
185 | if (pTcon->unix_ext) | 185 | if (pTcon->unix_ext) |
@@ -198,8 +198,8 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
198 | inode->i_sb, xid, NULL); | 198 | inode->i_sb, xid, NULL); |
199 | 199 | ||
200 | if (rc != 0) { | 200 | if (rc != 0) { |
201 | cFYI(1, ("Create symlink ok, getinodeinfo fail rc = %d", | 201 | cFYI(1, "Create symlink ok, getinodeinfo fail rc = %d", |
202 | rc)); | 202 | rc); |
203 | } else { | 203 | } else { |
204 | if (pTcon->nocase) | 204 | if (pTcon->nocase) |
205 | direntry->d_op = &cifs_ci_dentry_ops; | 205 | direntry->d_op = &cifs_ci_dentry_ops; |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index d1474996a812..1394aa37f26c 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -51,7 +51,7 @@ _GetXid(void) | |||
51 | if (GlobalTotalActiveXid > GlobalMaxActiveXid) | 51 | if (GlobalTotalActiveXid > GlobalMaxActiveXid) |
52 | GlobalMaxActiveXid = GlobalTotalActiveXid; | 52 | GlobalMaxActiveXid = GlobalTotalActiveXid; |
53 | if (GlobalTotalActiveXid > 65000) | 53 | if (GlobalTotalActiveXid > 65000) |
54 | cFYI(1, ("warning: more than 65000 requests active")); | 54 | cFYI(1, "warning: more than 65000 requests active"); |
55 | xid = GlobalCurrentXid++; | 55 | xid = GlobalCurrentXid++; |
56 | spin_unlock(&GlobalMid_Lock); | 56 | spin_unlock(&GlobalMid_Lock); |
57 | return xid; | 57 | return xid; |
@@ -88,7 +88,7 @@ void | |||
88 | sesInfoFree(struct cifsSesInfo *buf_to_free) | 88 | sesInfoFree(struct cifsSesInfo *buf_to_free) |
89 | { | 89 | { |
90 | if (buf_to_free == NULL) { | 90 | if (buf_to_free == NULL) { |
91 | cFYI(1, ("Null buffer passed to sesInfoFree")); | 91 | cFYI(1, "Null buffer passed to sesInfoFree"); |
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | 94 | ||
@@ -126,7 +126,7 @@ void | |||
126 | tconInfoFree(struct cifsTconInfo *buf_to_free) | 126 | tconInfoFree(struct cifsTconInfo *buf_to_free) |
127 | { | 127 | { |
128 | if (buf_to_free == NULL) { | 128 | if (buf_to_free == NULL) { |
129 | cFYI(1, ("Null buffer passed to tconInfoFree")); | 129 | cFYI(1, "Null buffer passed to tconInfoFree"); |
130 | return; | 130 | return; |
131 | } | 131 | } |
132 | atomic_dec(&tconInfoAllocCount); | 132 | atomic_dec(&tconInfoAllocCount); |
@@ -166,7 +166,7 @@ void | |||
166 | cifs_buf_release(void *buf_to_free) | 166 | cifs_buf_release(void *buf_to_free) |
167 | { | 167 | { |
168 | if (buf_to_free == NULL) { | 168 | if (buf_to_free == NULL) { |
169 | /* cFYI(1, ("Null buffer passed to cifs_buf_release"));*/ | 169 | /* cFYI(1, "Null buffer passed to cifs_buf_release");*/ |
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | mempool_free(buf_to_free, cifs_req_poolp); | 172 | mempool_free(buf_to_free, cifs_req_poolp); |
@@ -202,7 +202,7 @@ cifs_small_buf_release(void *buf_to_free) | |||
202 | { | 202 | { |
203 | 203 | ||
204 | if (buf_to_free == NULL) { | 204 | if (buf_to_free == NULL) { |
205 | cFYI(1, ("Null buffer passed to cifs_small_buf_release")); | 205 | cFYI(1, "Null buffer passed to cifs_small_buf_release"); |
206 | return; | 206 | return; |
207 | } | 207 | } |
208 | mempool_free(buf_to_free, cifs_sm_req_poolp); | 208 | mempool_free(buf_to_free, cifs_sm_req_poolp); |
@@ -345,19 +345,19 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , | |||
345 | /* with userid/password pairs found on the smb session */ | 345 | /* with userid/password pairs found on the smb session */ |
346 | /* for other target tcp/ip addresses BB */ | 346 | /* for other target tcp/ip addresses BB */ |
347 | if (current_fsuid() != treeCon->ses->linux_uid) { | 347 | if (current_fsuid() != treeCon->ses->linux_uid) { |
348 | cFYI(1, ("Multiuser mode and UID " | 348 | cFYI(1, "Multiuser mode and UID " |
349 | "did not match tcon uid")); | 349 | "did not match tcon uid"); |
350 | read_lock(&cifs_tcp_ses_lock); | 350 | read_lock(&cifs_tcp_ses_lock); |
351 | list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) { | 351 | list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) { |
352 | ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list); | 352 | ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list); |
353 | if (ses->linux_uid == current_fsuid()) { | 353 | if (ses->linux_uid == current_fsuid()) { |
354 | if (ses->server == treeCon->ses->server) { | 354 | if (ses->server == treeCon->ses->server) { |
355 | cFYI(1, ("found matching uid substitute right smb_uid")); | 355 | cFYI(1, "found matching uid substitute right smb_uid"); |
356 | buffer->Uid = ses->Suid; | 356 | buffer->Uid = ses->Suid; |
357 | break; | 357 | break; |
358 | } else { | 358 | } else { |
359 | /* BB eventually call cifs_setup_session here */ | 359 | /* BB eventually call cifs_setup_session here */ |
360 | cFYI(1, ("local UID found but no smb sess with this server exists")); | 360 | cFYI(1, "local UID found but no smb sess with this server exists"); |
361 | } | 361 | } |
362 | } | 362 | } |
363 | } | 363 | } |
@@ -394,17 +394,16 @@ checkSMBhdr(struct smb_hdr *smb, __u16 mid) | |||
394 | if (smb->Command == SMB_COM_LOCKING_ANDX) | 394 | if (smb->Command == SMB_COM_LOCKING_ANDX) |
395 | return 0; | 395 | return 0; |
396 | else | 396 | else |
397 | cERROR(1, ("Received Request not response")); | 397 | cERROR(1, "Received Request not response"); |
398 | } | 398 | } |
399 | } else { /* bad signature or mid */ | 399 | } else { /* bad signature or mid */ |
400 | if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff)) | 400 | if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff)) |
401 | cERROR(1, | 401 | cERROR(1, "Bad protocol string signature header %x", |
402 | ("Bad protocol string signature header %x", | 402 | *(unsigned int *) smb->Protocol); |
403 | *(unsigned int *) smb->Protocol)); | ||
404 | if (mid != smb->Mid) | 403 | if (mid != smb->Mid) |
405 | cERROR(1, ("Mids do not match")); | 404 | cERROR(1, "Mids do not match"); |
406 | } | 405 | } |
407 | cERROR(1, ("bad smb detected. The Mid=%d", smb->Mid)); | 406 | cERROR(1, "bad smb detected. The Mid=%d", smb->Mid); |
408 | return 1; | 407 | return 1; |
409 | } | 408 | } |
410 | 409 | ||
@@ -413,7 +412,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length) | |||
413 | { | 412 | { |
414 | __u32 len = smb->smb_buf_length; | 413 | __u32 len = smb->smb_buf_length; |
415 | __u32 clc_len; /* calculated length */ | 414 | __u32 clc_len; /* calculated length */ |
416 | cFYI(0, ("checkSMB Length: 0x%x, smb_buf_length: 0x%x", length, len)); | 415 | cFYI(0, "checkSMB Length: 0x%x, smb_buf_length: 0x%x", length, len); |
417 | 416 | ||
418 | if (length < 2 + sizeof(struct smb_hdr)) { | 417 | if (length < 2 + sizeof(struct smb_hdr)) { |
419 | if ((length >= sizeof(struct smb_hdr) - 1) | 418 | if ((length >= sizeof(struct smb_hdr) - 1) |
@@ -437,15 +436,15 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length) | |||
437 | tmp[sizeof(struct smb_hdr)+1] = 0; | 436 | tmp[sizeof(struct smb_hdr)+1] = 0; |
438 | return 0; | 437 | return 0; |
439 | } | 438 | } |
440 | cERROR(1, ("rcvd invalid byte count (bcc)")); | 439 | cERROR(1, "rcvd invalid byte count (bcc)"); |
441 | } else { | 440 | } else { |
442 | cERROR(1, ("Length less than smb header size")); | 441 | cERROR(1, "Length less than smb header size"); |
443 | } | 442 | } |
444 | return 1; | 443 | return 1; |
445 | } | 444 | } |
446 | if (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { | 445 | if (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { |
447 | cERROR(1, ("smb length greater than MaxBufSize, mid=%d", | 446 | cERROR(1, "smb length greater than MaxBufSize, mid=%d", |
448 | smb->Mid)); | 447 | smb->Mid); |
449 | return 1; | 448 | return 1; |
450 | } | 449 | } |
451 | 450 | ||
@@ -454,8 +453,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length) | |||
454 | clc_len = smbCalcSize_LE(smb); | 453 | clc_len = smbCalcSize_LE(smb); |
455 | 454 | ||
456 | if (4 + len != length) { | 455 | if (4 + len != length) { |
457 | cERROR(1, ("Length read does not match RFC1001 length %d", | 456 | cERROR(1, "Length read does not match RFC1001 length %d", |
458 | len)); | 457 | len); |
459 | return 1; | 458 | return 1; |
460 | } | 459 | } |
461 | 460 | ||
@@ -466,8 +465,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length) | |||
466 | if (((4 + len) & 0xFFFF) == (clc_len & 0xFFFF)) | 465 | if (((4 + len) & 0xFFFF) == (clc_len & 0xFFFF)) |
467 | return 0; /* bcc wrapped */ | 466 | return 0; /* bcc wrapped */ |
468 | } | 467 | } |
469 | cFYI(1, ("Calculated size %d vs length %d mismatch for mid %d", | 468 | cFYI(1, "Calculated size %d vs length %d mismatch for mid %d", |
470 | clc_len, 4 + len, smb->Mid)); | 469 | clc_len, 4 + len, smb->Mid); |
471 | /* Windows XP can return a few bytes too much, presumably | 470 | /* Windows XP can return a few bytes too much, presumably |
472 | an illegal pad, at the end of byte range lock responses | 471 | an illegal pad, at the end of byte range lock responses |
473 | so we allow for that three byte pad, as long as actual | 472 | so we allow for that three byte pad, as long as actual |
@@ -482,8 +481,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length) | |||
482 | if ((4+len > clc_len) && (len <= clc_len + 512)) | 481 | if ((4+len > clc_len) && (len <= clc_len + 512)) |
483 | return 0; | 482 | return 0; |
484 | else { | 483 | else { |
485 | cERROR(1, ("RFC1001 size %d bigger than SMB for Mid=%d", | 484 | cERROR(1, "RFC1001 size %d bigger than SMB for Mid=%d", |
486 | len, smb->Mid)); | 485 | len, smb->Mid); |
487 | return 1; | 486 | return 1; |
488 | } | 487 | } |
489 | } | 488 | } |
@@ -501,7 +500,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
501 | struct cifsFileInfo *netfile; | 500 | struct cifsFileInfo *netfile; |
502 | int rc; | 501 | int rc; |
503 | 502 | ||
504 | cFYI(1, ("Checking for oplock break or dnotify response")); | 503 | cFYI(1, "Checking for oplock break or dnotify response"); |
505 | if ((pSMB->hdr.Command == SMB_COM_NT_TRANSACT) && | 504 | if ((pSMB->hdr.Command == SMB_COM_NT_TRANSACT) && |
506 | (pSMB->hdr.Flags & SMBFLG_RESPONSE)) { | 505 | (pSMB->hdr.Flags & SMBFLG_RESPONSE)) { |
507 | struct smb_com_transaction_change_notify_rsp *pSMBr = | 506 | struct smb_com_transaction_change_notify_rsp *pSMBr = |
@@ -513,15 +512,15 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
513 | 512 | ||
514 | pnotify = (struct file_notify_information *) | 513 | pnotify = (struct file_notify_information *) |
515 | ((char *)&pSMBr->hdr.Protocol + data_offset); | 514 | ((char *)&pSMBr->hdr.Protocol + data_offset); |
516 | cFYI(1, ("dnotify on %s Action: 0x%x", | 515 | cFYI(1, "dnotify on %s Action: 0x%x", |
517 | pnotify->FileName, pnotify->Action)); | 516 | pnotify->FileName, pnotify->Action); |
518 | /* cifs_dump_mem("Rcvd notify Data: ",buf, | 517 | /* cifs_dump_mem("Rcvd notify Data: ",buf, |
519 | sizeof(struct smb_hdr)+60); */ | 518 | sizeof(struct smb_hdr)+60); */ |
520 | return true; | 519 | return true; |
521 | } | 520 | } |
522 | if (pSMBr->hdr.Status.CifsError) { | 521 | if (pSMBr->hdr.Status.CifsError) { |
523 | cFYI(1, ("notify err 0x%d", | 522 | cFYI(1, "notify err 0x%d", |
524 | pSMBr->hdr.Status.CifsError)); | 523 | pSMBr->hdr.Status.CifsError); |
525 | return true; | 524 | return true; |
526 | } | 525 | } |
527 | return false; | 526 | return false; |
@@ -535,7 +534,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
535 | large dirty files cached on the client */ | 534 | large dirty files cached on the client */ |
536 | if ((NT_STATUS_INVALID_HANDLE) == | 535 | if ((NT_STATUS_INVALID_HANDLE) == |
537 | le32_to_cpu(pSMB->hdr.Status.CifsError)) { | 536 | le32_to_cpu(pSMB->hdr.Status.CifsError)) { |
538 | cFYI(1, ("invalid handle on oplock break")); | 537 | cFYI(1, "invalid handle on oplock break"); |
539 | return true; | 538 | return true; |
540 | } else if (ERRbadfid == | 539 | } else if (ERRbadfid == |
541 | le16_to_cpu(pSMB->hdr.Status.DosError.Error)) { | 540 | le16_to_cpu(pSMB->hdr.Status.DosError.Error)) { |
@@ -547,8 +546,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
547 | if (pSMB->hdr.WordCount != 8) | 546 | if (pSMB->hdr.WordCount != 8) |
548 | return false; | 547 | return false; |
549 | 548 | ||
550 | cFYI(1, ("oplock type 0x%d level 0x%d", | 549 | cFYI(1, "oplock type 0x%d level 0x%d", |
551 | pSMB->LockType, pSMB->OplockLevel)); | 550 | pSMB->LockType, pSMB->OplockLevel); |
552 | if (!(pSMB->LockType & LOCKING_ANDX_OPLOCK_RELEASE)) | 551 | if (!(pSMB->LockType & LOCKING_ANDX_OPLOCK_RELEASE)) |
553 | return false; | 552 | return false; |
554 | 553 | ||
@@ -579,15 +578,15 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
579 | return true; | 578 | return true; |
580 | } | 579 | } |
581 | 580 | ||
582 | cFYI(1, ("file id match, oplock break")); | 581 | cFYI(1, "file id match, oplock break"); |
583 | pCifsInode = CIFS_I(netfile->pInode); | 582 | pCifsInode = CIFS_I(netfile->pInode); |
584 | pCifsInode->clientCanCacheAll = false; | 583 | pCifsInode->clientCanCacheAll = false; |
585 | if (pSMB->OplockLevel == 0) | 584 | if (pSMB->OplockLevel == 0) |
586 | pCifsInode->clientCanCacheRead = false; | 585 | pCifsInode->clientCanCacheRead = false; |
587 | rc = slow_work_enqueue(&netfile->oplock_break); | 586 | rc = slow_work_enqueue(&netfile->oplock_break); |
588 | if (rc) { | 587 | if (rc) { |
589 | cERROR(1, ("failed to enqueue oplock " | 588 | cERROR(1, "failed to enqueue oplock " |
590 | "break: %d\n", rc)); | 589 | "break: %d\n", rc); |
591 | } else { | 590 | } else { |
592 | netfile->oplock_break_cancelled = false; | 591 | netfile->oplock_break_cancelled = false; |
593 | } | 592 | } |
@@ -597,12 +596,12 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
597 | } | 596 | } |
598 | read_unlock(&GlobalSMBSeslock); | 597 | read_unlock(&GlobalSMBSeslock); |
599 | read_unlock(&cifs_tcp_ses_lock); | 598 | read_unlock(&cifs_tcp_ses_lock); |
600 | cFYI(1, ("No matching file for oplock break")); | 599 | cFYI(1, "No matching file for oplock break"); |
601 | return true; | 600 | return true; |
602 | } | 601 | } |
603 | } | 602 | } |
604 | read_unlock(&cifs_tcp_ses_lock); | 603 | read_unlock(&cifs_tcp_ses_lock); |
605 | cFYI(1, ("Can not process oplock break for non-existent connection")); | 604 | cFYI(1, "Can not process oplock break for non-existent connection"); |
606 | return true; | 605 | return true; |
607 | } | 606 | } |
608 | 607 | ||
@@ -721,11 +720,11 @@ cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) | |||
721 | { | 720 | { |
722 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 721 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { |
723 | cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; | 722 | cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; |
724 | cERROR(1, ("Autodisabling the use of server inode numbers on " | 723 | cERROR(1, "Autodisabling the use of server inode numbers on " |
725 | "%s. This server doesn't seem to support them " | 724 | "%s. This server doesn't seem to support them " |
726 | "properly. Hardlinks will not be recognized on this " | 725 | "properly. Hardlinks will not be recognized on this " |
727 | "mount. Consider mounting with the \"noserverino\" " | 726 | "mount. Consider mounting with the \"noserverino\" " |
728 | "option to silence this message.", | 727 | "option to silence this message.", |
729 | cifs_sb->tcon->treeName)); | 728 | cifs_sb->tcon->treeName); |
730 | } | 729 | } |
731 | } | 730 | } |
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index bd6d6895730d..d35d52889cb5 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c | |||
@@ -149,7 +149,7 @@ cifs_inet_pton(const int address_family, const char *cp, void *dst) | |||
149 | else if (address_family == AF_INET6) | 149 | else if (address_family == AF_INET6) |
150 | ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); | 150 | ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); |
151 | 151 | ||
152 | cFYI(DBG2, ("address conversion returned %d for %s", ret, cp)); | 152 | cFYI(DBG2, "address conversion returned %d for %s", ret, cp); |
153 | if (ret > 0) | 153 | if (ret > 0) |
154 | ret = 1; | 154 | ret = 1; |
155 | return ret; | 155 | return ret; |
@@ -870,8 +870,8 @@ map_smb_to_linux_error(struct smb_hdr *smb, int logErr) | |||
870 | } | 870 | } |
871 | /* else ERRHRD class errors or junk - return EIO */ | 871 | /* else ERRHRD class errors or junk - return EIO */ |
872 | 872 | ||
873 | cFYI(1, ("Mapping smb error code %d to POSIX err %d", | 873 | cFYI(1, "Mapping smb error code %d to POSIX err %d", |
874 | smberrcode, rc)); | 874 | smberrcode, rc); |
875 | 875 | ||
876 | /* generic corrective action e.g. reconnect SMB session on | 876 | /* generic corrective action e.g. reconnect SMB session on |
877 | * ERRbaduid could be added */ | 877 | * ERRbaduid could be added */ |
@@ -940,20 +940,20 @@ struct timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset) | |||
940 | SMB_TIME *st = (SMB_TIME *)&time; | 940 | SMB_TIME *st = (SMB_TIME *)&time; |
941 | SMB_DATE *sd = (SMB_DATE *)&date; | 941 | SMB_DATE *sd = (SMB_DATE *)&date; |
942 | 942 | ||
943 | cFYI(1, ("date %d time %d", date, time)); | 943 | cFYI(1, "date %d time %d", date, time); |
944 | 944 | ||
945 | sec = 2 * st->TwoSeconds; | 945 | sec = 2 * st->TwoSeconds; |
946 | min = st->Minutes; | 946 | min = st->Minutes; |
947 | if ((sec > 59) || (min > 59)) | 947 | if ((sec > 59) || (min > 59)) |
948 | cERROR(1, ("illegal time min %d sec %d", min, sec)); | 948 | cERROR(1, "illegal time min %d sec %d", min, sec); |
949 | sec += (min * 60); | 949 | sec += (min * 60); |
950 | sec += 60 * 60 * st->Hours; | 950 | sec += 60 * 60 * st->Hours; |
951 | if (st->Hours > 24) | 951 | if (st->Hours > 24) |
952 | cERROR(1, ("illegal hours %d", st->Hours)); | 952 | cERROR(1, "illegal hours %d", st->Hours); |
953 | days = sd->Day; | 953 | days = sd->Day; |
954 | month = sd->Month; | 954 | month = sd->Month; |
955 | if ((days > 31) || (month > 12)) { | 955 | if ((days > 31) || (month > 12)) { |
956 | cERROR(1, ("illegal date, month %d day: %d", month, days)); | 956 | cERROR(1, "illegal date, month %d day: %d", month, days); |
957 | if (month > 12) | 957 | if (month > 12) |
958 | month = 12; | 958 | month = 12; |
959 | } | 959 | } |
@@ -979,7 +979,7 @@ struct timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset) | |||
979 | 979 | ||
980 | ts.tv_sec = sec + offset; | 980 | ts.tv_sec = sec + offset; |
981 | 981 | ||
982 | /* cFYI(1,("sec after cnvrt dos to unix time %d",sec)); */ | 982 | /* cFYI(1, "sec after cnvrt dos to unix time %d",sec); */ |
983 | 983 | ||
984 | ts.tv_nsec = 0; | 984 | ts.tv_nsec = 0; |
985 | return ts; | 985 | return ts; |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 18e0bc1fb593..daf1753af674 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -47,15 +47,15 @@ static void dump_cifs_file_struct(struct file *file, char *label) | |||
47 | if (file) { | 47 | if (file) { |
48 | cf = file->private_data; | 48 | cf = file->private_data; |
49 | if (cf == NULL) { | 49 | if (cf == NULL) { |
50 | cFYI(1, ("empty cifs private file data")); | 50 | cFYI(1, "empty cifs private file data"); |
51 | return; | 51 | return; |
52 | } | 52 | } |
53 | if (cf->invalidHandle) | 53 | if (cf->invalidHandle) |
54 | cFYI(1, ("invalid handle")); | 54 | cFYI(1, "invalid handle"); |
55 | if (cf->srch_inf.endOfSearch) | 55 | if (cf->srch_inf.endOfSearch) |
56 | cFYI(1, ("end of search")); | 56 | cFYI(1, "end of search"); |
57 | if (cf->srch_inf.emptyDir) | 57 | if (cf->srch_inf.emptyDir) |
58 | cFYI(1, ("empty dir")); | 58 | cFYI(1, "empty dir"); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | #else | 61 | #else |
@@ -76,7 +76,7 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name, | |||
76 | struct inode *inode; | 76 | struct inode *inode; |
77 | struct super_block *sb = parent->d_inode->i_sb; | 77 | struct super_block *sb = parent->d_inode->i_sb; |
78 | 78 | ||
79 | cFYI(1, ("For %s", name->name)); | 79 | cFYI(1, "For %s", name->name); |
80 | 80 | ||
81 | if (parent->d_op && parent->d_op->d_hash) | 81 | if (parent->d_op && parent->d_op->d_hash) |
82 | parent->d_op->d_hash(parent, name); | 82 | parent->d_op->d_hash(parent, name); |
@@ -214,7 +214,7 @@ int get_symlink_reparse_path(char *full_path, struct cifs_sb_info *cifs_sb, | |||
214 | fid, | 214 | fid, |
215 | cifs_sb->local_nls); | 215 | cifs_sb->local_nls); |
216 | if (CIFSSMBClose(xid, ptcon, fid)) { | 216 | if (CIFSSMBClose(xid, ptcon, fid)) { |
217 | cFYI(1, ("Error closing temporary reparsepoint open)")); | 217 | cFYI(1, "Error closing temporary reparsepoint open"); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | } | 220 | } |
@@ -252,7 +252,7 @@ static int initiate_cifs_search(const int xid, struct file *file) | |||
252 | if (full_path == NULL) | 252 | if (full_path == NULL) |
253 | return -ENOMEM; | 253 | return -ENOMEM; |
254 | 254 | ||
255 | cFYI(1, ("Full path: %s start at: %lld", full_path, file->f_pos)); | 255 | cFYI(1, "Full path: %s start at: %lld", full_path, file->f_pos); |
256 | 256 | ||
257 | ffirst_retry: | 257 | ffirst_retry: |
258 | /* test for Unix extensions */ | 258 | /* test for Unix extensions */ |
@@ -297,7 +297,7 @@ static int cifs_unicode_bytelen(char *str) | |||
297 | if (ustr[len] == 0) | 297 | if (ustr[len] == 0) |
298 | return len << 1; | 298 | return len << 1; |
299 | } | 299 | } |
300 | cFYI(1, ("Unicode string longer than PATH_MAX found")); | 300 | cFYI(1, "Unicode string longer than PATH_MAX found"); |
301 | return len << 1; | 301 | return len << 1; |
302 | } | 302 | } |
303 | 303 | ||
@@ -314,19 +314,18 @@ static char *nxt_dir_entry(char *old_entry, char *end_of_smb, int level) | |||
314 | pfData->FileNameLength; | 314 | pfData->FileNameLength; |
315 | } else | 315 | } else |
316 | new_entry = old_entry + le32_to_cpu(pDirInfo->NextEntryOffset); | 316 | new_entry = old_entry + le32_to_cpu(pDirInfo->NextEntryOffset); |
317 | cFYI(1, ("new entry %p old entry %p", new_entry, old_entry)); | 317 | cFYI(1, "new entry %p old entry %p", new_entry, old_entry); |
318 | /* validate that new_entry is not past end of SMB */ | 318 | /* validate that new_entry is not past end of SMB */ |
319 | if (new_entry >= end_of_smb) { | 319 | if (new_entry >= end_of_smb) { |
320 | cERROR(1, | 320 | cERROR(1, "search entry %p began after end of SMB %p old entry %p", |
321 | ("search entry %p began after end of SMB %p old entry %p", | 321 | new_entry, end_of_smb, old_entry); |
322 | new_entry, end_of_smb, old_entry)); | ||
323 | return NULL; | 322 | return NULL; |
324 | } else if (((level == SMB_FIND_FILE_INFO_STANDARD) && | 323 | } else if (((level == SMB_FIND_FILE_INFO_STANDARD) && |
325 | (new_entry + sizeof(FIND_FILE_STANDARD_INFO) > end_of_smb)) | 324 | (new_entry + sizeof(FIND_FILE_STANDARD_INFO) > end_of_smb)) |
326 | || ((level != SMB_FIND_FILE_INFO_STANDARD) && | 325 | || ((level != SMB_FIND_FILE_INFO_STANDARD) && |
327 | (new_entry + sizeof(FILE_DIRECTORY_INFO) > end_of_smb))) { | 326 | (new_entry + sizeof(FILE_DIRECTORY_INFO) > end_of_smb))) { |
328 | cERROR(1, ("search entry %p extends after end of SMB %p", | 327 | cERROR(1, "search entry %p extends after end of SMB %p", |
329 | new_entry, end_of_smb)); | 328 | new_entry, end_of_smb); |
330 | return NULL; | 329 | return NULL; |
331 | } else | 330 | } else |
332 | return new_entry; | 331 | return new_entry; |
@@ -380,8 +379,8 @@ static int cifs_entry_is_dot(char *current_entry, struct cifsFileInfo *cfile) | |||
380 | filename = &pFindData->FileName[0]; | 379 | filename = &pFindData->FileName[0]; |
381 | len = pFindData->FileNameLength; | 380 | len = pFindData->FileNameLength; |
382 | } else { | 381 | } else { |
383 | cFYI(1, ("Unknown findfirst level %d", | 382 | cFYI(1, "Unknown findfirst level %d", |
384 | cfile->srch_inf.info_level)); | 383 | cfile->srch_inf.info_level); |
385 | } | 384 | } |
386 | 385 | ||
387 | if (filename) { | 386 | if (filename) { |
@@ -481,7 +480,7 @@ static int cifs_save_resume_key(const char *current_entry, | |||
481 | len = (unsigned int)pFindData->FileNameLength; | 480 | len = (unsigned int)pFindData->FileNameLength; |
482 | cifsFile->srch_inf.resume_key = pFindData->ResumeKey; | 481 | cifsFile->srch_inf.resume_key = pFindData->ResumeKey; |
483 | } else { | 482 | } else { |
484 | cFYI(1, ("Unknown findfirst level %d", level)); | 483 | cFYI(1, "Unknown findfirst level %d", level); |
485 | return -EINVAL; | 484 | return -EINVAL; |
486 | } | 485 | } |
487 | cifsFile->srch_inf.resume_name_len = len; | 486 | cifsFile->srch_inf.resume_name_len = len; |
@@ -525,7 +524,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
525 | is_dir_changed(file)) || | 524 | is_dir_changed(file)) || |
526 | (index_to_find < first_entry_in_buffer)) { | 525 | (index_to_find < first_entry_in_buffer)) { |
527 | /* close and restart search */ | 526 | /* close and restart search */ |
528 | cFYI(1, ("search backing up - close and restart search")); | 527 | cFYI(1, "search backing up - close and restart search"); |
529 | write_lock(&GlobalSMBSeslock); | 528 | write_lock(&GlobalSMBSeslock); |
530 | if (!cifsFile->srch_inf.endOfSearch && | 529 | if (!cifsFile->srch_inf.endOfSearch && |
531 | !cifsFile->invalidHandle) { | 530 | !cifsFile->invalidHandle) { |
@@ -535,7 +534,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
535 | } else | 534 | } else |
536 | write_unlock(&GlobalSMBSeslock); | 535 | write_unlock(&GlobalSMBSeslock); |
537 | if (cifsFile->srch_inf.ntwrk_buf_start) { | 536 | if (cifsFile->srch_inf.ntwrk_buf_start) { |
538 | cFYI(1, ("freeing SMB ff cache buf on search rewind")); | 537 | cFYI(1, "freeing SMB ff cache buf on search rewind"); |
539 | if (cifsFile->srch_inf.smallBuf) | 538 | if (cifsFile->srch_inf.smallBuf) |
540 | cifs_small_buf_release(cifsFile->srch_inf. | 539 | cifs_small_buf_release(cifsFile->srch_inf. |
541 | ntwrk_buf_start); | 540 | ntwrk_buf_start); |
@@ -546,8 +545,8 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
546 | } | 545 | } |
547 | rc = initiate_cifs_search(xid, file); | 546 | rc = initiate_cifs_search(xid, file); |
548 | if (rc) { | 547 | if (rc) { |
549 | cFYI(1, ("error %d reinitiating a search on rewind", | 548 | cFYI(1, "error %d reinitiating a search on rewind", |
550 | rc)); | 549 | rc); |
551 | return rc; | 550 | return rc; |
552 | } | 551 | } |
553 | cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile); | 552 | cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile); |
@@ -555,7 +554,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
555 | 554 | ||
556 | while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) && | 555 | while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) && |
557 | (rc == 0) && !cifsFile->srch_inf.endOfSearch) { | 556 | (rc == 0) && !cifsFile->srch_inf.endOfSearch) { |
558 | cFYI(1, ("calling findnext2")); | 557 | cFYI(1, "calling findnext2"); |
559 | rc = CIFSFindNext(xid, pTcon, cifsFile->netfid, | 558 | rc = CIFSFindNext(xid, pTcon, cifsFile->netfid, |
560 | &cifsFile->srch_inf); | 559 | &cifsFile->srch_inf); |
561 | cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile); | 560 | cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile); |
@@ -575,7 +574,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
575 | first_entry_in_buffer = cifsFile->srch_inf.index_of_last_entry | 574 | first_entry_in_buffer = cifsFile->srch_inf.index_of_last_entry |
576 | - cifsFile->srch_inf.entries_in_buffer; | 575 | - cifsFile->srch_inf.entries_in_buffer; |
577 | pos_in_buf = index_to_find - first_entry_in_buffer; | 576 | pos_in_buf = index_to_find - first_entry_in_buffer; |
578 | cFYI(1, ("found entry - pos_in_buf %d", pos_in_buf)); | 577 | cFYI(1, "found entry - pos_in_buf %d", pos_in_buf); |
579 | 578 | ||
580 | for (i = 0; (i < (pos_in_buf)) && (current_entry != NULL); i++) { | 579 | for (i = 0; (i < (pos_in_buf)) && (current_entry != NULL); i++) { |
581 | /* go entry by entry figuring out which is first */ | 580 | /* go entry by entry figuring out which is first */ |
@@ -584,19 +583,19 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
584 | } | 583 | } |
585 | if ((current_entry == NULL) && (i < pos_in_buf)) { | 584 | if ((current_entry == NULL) && (i < pos_in_buf)) { |
586 | /* BB fixme - check if we should flag this error */ | 585 | /* BB fixme - check if we should flag this error */ |
587 | cERROR(1, ("reached end of buf searching for pos in buf" | 586 | cERROR(1, "reached end of buf searching for pos in buf" |
588 | " %d index to find %lld rc %d", | 587 | " %d index to find %lld rc %d", |
589 | pos_in_buf, index_to_find, rc)); | 588 | pos_in_buf, index_to_find, rc); |
590 | } | 589 | } |
591 | rc = 0; | 590 | rc = 0; |
592 | *ppCurrentEntry = current_entry; | 591 | *ppCurrentEntry = current_entry; |
593 | } else { | 592 | } else { |
594 | cFYI(1, ("index not in buffer - could not findnext into it")); | 593 | cFYI(1, "index not in buffer - could not findnext into it"); |
595 | return 0; | 594 | return 0; |
596 | } | 595 | } |
597 | 596 | ||
598 | if (pos_in_buf >= cifsFile->srch_inf.entries_in_buffer) { | 597 | if (pos_in_buf >= cifsFile->srch_inf.entries_in_buffer) { |
599 | cFYI(1, ("can not return entries pos_in_buf beyond last")); | 598 | cFYI(1, "can not return entries pos_in_buf beyond last"); |
600 | *num_to_ret = 0; | 599 | *num_to_ret = 0; |
601 | } else | 600 | } else |
602 | *num_to_ret = cifsFile->srch_inf.entries_in_buffer - pos_in_buf; | 601 | *num_to_ret = cifsFile->srch_inf.entries_in_buffer - pos_in_buf; |
@@ -656,12 +655,12 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst, | |||
656 | /* one byte length, no name conversion */ | 655 | /* one byte length, no name conversion */ |
657 | len = (unsigned int)pFindData->FileNameLength; | 656 | len = (unsigned int)pFindData->FileNameLength; |
658 | } else { | 657 | } else { |
659 | cFYI(1, ("Unknown findfirst level %d", level)); | 658 | cFYI(1, "Unknown findfirst level %d", level); |
660 | return -EINVAL; | 659 | return -EINVAL; |
661 | } | 660 | } |
662 | 661 | ||
663 | if (len > max_len) { | 662 | if (len > max_len) { |
664 | cERROR(1, ("bad search response length %d past smb end", len)); | 663 | cERROR(1, "bad search response length %d past smb end", len); |
665 | return -EINVAL; | 664 | return -EINVAL; |
666 | } | 665 | } |
667 | 666 | ||
@@ -754,7 +753,7 @@ static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, | |||
754 | * case already. Why should we be clobbering other errors from it? | 753 | * case already. Why should we be clobbering other errors from it? |
755 | */ | 754 | */ |
756 | if (rc) { | 755 | if (rc) { |
757 | cFYI(1, ("filldir rc = %d", rc)); | 756 | cFYI(1, "filldir rc = %d", rc); |
758 | rc = -EOVERFLOW; | 757 | rc = -EOVERFLOW; |
759 | } | 758 | } |
760 | dput(tmp_dentry); | 759 | dput(tmp_dentry); |
@@ -786,7 +785,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
786 | case 0: | 785 | case 0: |
787 | if (filldir(direntry, ".", 1, file->f_pos, | 786 | if (filldir(direntry, ".", 1, file->f_pos, |
788 | file->f_path.dentry->d_inode->i_ino, DT_DIR) < 0) { | 787 | file->f_path.dentry->d_inode->i_ino, DT_DIR) < 0) { |
789 | cERROR(1, ("Filldir for current dir failed")); | 788 | cERROR(1, "Filldir for current dir failed"); |
790 | rc = -ENOMEM; | 789 | rc = -ENOMEM; |
791 | break; | 790 | break; |
792 | } | 791 | } |
@@ -794,7 +793,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
794 | case 1: | 793 | case 1: |
795 | if (filldir(direntry, "..", 2, file->f_pos, | 794 | if (filldir(direntry, "..", 2, file->f_pos, |
796 | file->f_path.dentry->d_parent->d_inode->i_ino, DT_DIR) < 0) { | 795 | file->f_path.dentry->d_parent->d_inode->i_ino, DT_DIR) < 0) { |
797 | cERROR(1, ("Filldir for parent dir failed")); | 796 | cERROR(1, "Filldir for parent dir failed"); |
798 | rc = -ENOMEM; | 797 | rc = -ENOMEM; |
799 | break; | 798 | break; |
800 | } | 799 | } |
@@ -807,7 +806,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
807 | 806 | ||
808 | if (file->private_data == NULL) { | 807 | if (file->private_data == NULL) { |
809 | rc = initiate_cifs_search(xid, file); | 808 | rc = initiate_cifs_search(xid, file); |
810 | cFYI(1, ("initiate cifs search rc %d", rc)); | 809 | cFYI(1, "initiate cifs search rc %d", rc); |
811 | if (rc) { | 810 | if (rc) { |
812 | FreeXid(xid); | 811 | FreeXid(xid); |
813 | return rc; | 812 | return rc; |
@@ -821,7 +820,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
821 | cifsFile = file->private_data; | 820 | cifsFile = file->private_data; |
822 | if (cifsFile->srch_inf.endOfSearch) { | 821 | if (cifsFile->srch_inf.endOfSearch) { |
823 | if (cifsFile->srch_inf.emptyDir) { | 822 | if (cifsFile->srch_inf.emptyDir) { |
824 | cFYI(1, ("End of search, empty dir")); | 823 | cFYI(1, "End of search, empty dir"); |
825 | rc = 0; | 824 | rc = 0; |
826 | break; | 825 | break; |
827 | } | 826 | } |
@@ -833,16 +832,16 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
833 | rc = find_cifs_entry(xid, pTcon, file, | 832 | rc = find_cifs_entry(xid, pTcon, file, |
834 | ¤t_entry, &num_to_fill); | 833 | ¤t_entry, &num_to_fill); |
835 | if (rc) { | 834 | if (rc) { |
836 | cFYI(1, ("fce error %d", rc)); | 835 | cFYI(1, "fce error %d", rc); |
837 | goto rddir2_exit; | 836 | goto rddir2_exit; |
838 | } else if (current_entry != NULL) { | 837 | } else if (current_entry != NULL) { |
839 | cFYI(1, ("entry %lld found", file->f_pos)); | 838 | cFYI(1, "entry %lld found", file->f_pos); |
840 | } else { | 839 | } else { |
841 | cFYI(1, ("could not find entry")); | 840 | cFYI(1, "could not find entry"); |
842 | goto rddir2_exit; | 841 | goto rddir2_exit; |
843 | } | 842 | } |
844 | cFYI(1, ("loop through %d times filling dir for net buf %p", | 843 | cFYI(1, "loop through %d times filling dir for net buf %p", |
845 | num_to_fill, cifsFile->srch_inf.ntwrk_buf_start)); | 844 | num_to_fill, cifsFile->srch_inf.ntwrk_buf_start); |
846 | max_len = smbCalcSize((struct smb_hdr *) | 845 | max_len = smbCalcSize((struct smb_hdr *) |
847 | cifsFile->srch_inf.ntwrk_buf_start); | 846 | cifsFile->srch_inf.ntwrk_buf_start); |
848 | end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + max_len; | 847 | end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + max_len; |
@@ -851,8 +850,8 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
851 | for (i = 0; (i < num_to_fill) && (rc == 0); i++) { | 850 | for (i = 0; (i < num_to_fill) && (rc == 0); i++) { |
852 | if (current_entry == NULL) { | 851 | if (current_entry == NULL) { |
853 | /* evaluate whether this case is an error */ | 852 | /* evaluate whether this case is an error */ |
854 | cERROR(1, ("past SMB end, num to fill %d i %d", | 853 | cERROR(1, "past SMB end, num to fill %d i %d", |
855 | num_to_fill, i)); | 854 | num_to_fill, i); |
856 | break; | 855 | break; |
857 | } | 856 | } |
858 | /* if buggy server returns . and .. late do | 857 | /* if buggy server returns . and .. late do |
@@ -867,8 +866,8 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
867 | file->f_pos++; | 866 | file->f_pos++; |
868 | if (file->f_pos == | 867 | if (file->f_pos == |
869 | cifsFile->srch_inf.index_of_last_entry) { | 868 | cifsFile->srch_inf.index_of_last_entry) { |
870 | cFYI(1, ("last entry in buf at pos %lld %s", | 869 | cFYI(1, "last entry in buf at pos %lld %s", |
871 | file->f_pos, tmp_buf)); | 870 | file->f_pos, tmp_buf); |
872 | cifs_save_resume_key(current_entry, cifsFile); | 871 | cifs_save_resume_key(current_entry, cifsFile); |
873 | break; | 872 | break; |
874 | } else | 873 | } else |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 7c3fd7463f44..da9729da03e0 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -284,7 +284,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | |||
284 | int len; | 284 | int len; |
285 | char *data = *pbcc_area; | 285 | char *data = *pbcc_area; |
286 | 286 | ||
287 | cFYI(1, ("bleft %d", bleft)); | 287 | cFYI(1, "bleft %d", bleft); |
288 | 288 | ||
289 | /* | 289 | /* |
290 | * Windows servers do not always double null terminate their final | 290 | * Windows servers do not always double null terminate their final |
@@ -301,7 +301,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | |||
301 | 301 | ||
302 | kfree(ses->serverOS); | 302 | kfree(ses->serverOS); |
303 | ses->serverOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp); | 303 | ses->serverOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp); |
304 | cFYI(1, ("serverOS=%s", ses->serverOS)); | 304 | cFYI(1, "serverOS=%s", ses->serverOS); |
305 | len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; | 305 | len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; |
306 | data += len; | 306 | data += len; |
307 | bleft -= len; | 307 | bleft -= len; |
@@ -310,7 +310,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | |||
310 | 310 | ||
311 | kfree(ses->serverNOS); | 311 | kfree(ses->serverNOS); |
312 | ses->serverNOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp); | 312 | ses->serverNOS = cifs_strndup_from_ucs(data, bleft, true, nls_cp); |
313 | cFYI(1, ("serverNOS=%s", ses->serverNOS)); | 313 | cFYI(1, "serverNOS=%s", ses->serverNOS); |
314 | len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; | 314 | len = (UniStrnlen((wchar_t *) data, bleft / 2) * 2) + 2; |
315 | data += len; | 315 | data += len; |
316 | bleft -= len; | 316 | bleft -= len; |
@@ -319,7 +319,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | |||
319 | 319 | ||
320 | kfree(ses->serverDomain); | 320 | kfree(ses->serverDomain); |
321 | ses->serverDomain = cifs_strndup_from_ucs(data, bleft, true, nls_cp); | 321 | ses->serverDomain = cifs_strndup_from_ucs(data, bleft, true, nls_cp); |
322 | cFYI(1, ("serverDomain=%s", ses->serverDomain)); | 322 | cFYI(1, "serverDomain=%s", ses->serverDomain); |
323 | 323 | ||
324 | return; | 324 | return; |
325 | } | 325 | } |
@@ -332,7 +332,7 @@ static int decode_ascii_ssetup(char **pbcc_area, int bleft, | |||
332 | int len; | 332 | int len; |
333 | char *bcc_ptr = *pbcc_area; | 333 | char *bcc_ptr = *pbcc_area; |
334 | 334 | ||
335 | cFYI(1, ("decode sessetup ascii. bleft %d", bleft)); | 335 | cFYI(1, "decode sessetup ascii. bleft %d", bleft); |
336 | 336 | ||
337 | len = strnlen(bcc_ptr, bleft); | 337 | len = strnlen(bcc_ptr, bleft); |
338 | if (len >= bleft) | 338 | if (len >= bleft) |
@@ -344,7 +344,7 @@ static int decode_ascii_ssetup(char **pbcc_area, int bleft, | |||
344 | if (ses->serverOS) | 344 | if (ses->serverOS) |
345 | strncpy(ses->serverOS, bcc_ptr, len); | 345 | strncpy(ses->serverOS, bcc_ptr, len); |
346 | if (strncmp(ses->serverOS, "OS/2", 4) == 0) { | 346 | if (strncmp(ses->serverOS, "OS/2", 4) == 0) { |
347 | cFYI(1, ("OS/2 server")); | 347 | cFYI(1, "OS/2 server"); |
348 | ses->flags |= CIFS_SES_OS2; | 348 | ses->flags |= CIFS_SES_OS2; |
349 | } | 349 | } |
350 | 350 | ||
@@ -373,7 +373,7 @@ static int decode_ascii_ssetup(char **pbcc_area, int bleft, | |||
373 | /* BB For newer servers which do not support Unicode, | 373 | /* BB For newer servers which do not support Unicode, |
374 | but thus do return domain here we could add parsing | 374 | but thus do return domain here we could add parsing |
375 | for it later, but it is not very important */ | 375 | for it later, but it is not very important */ |
376 | cFYI(1, ("ascii: bytes left %d", bleft)); | 376 | cFYI(1, "ascii: bytes left %d", bleft); |
377 | 377 | ||
378 | return rc; | 378 | return rc; |
379 | } | 379 | } |
@@ -384,16 +384,16 @@ static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, | |||
384 | CHALLENGE_MESSAGE *pblob = (CHALLENGE_MESSAGE *)bcc_ptr; | 384 | CHALLENGE_MESSAGE *pblob = (CHALLENGE_MESSAGE *)bcc_ptr; |
385 | 385 | ||
386 | if (blob_len < sizeof(CHALLENGE_MESSAGE)) { | 386 | if (blob_len < sizeof(CHALLENGE_MESSAGE)) { |
387 | cERROR(1, ("challenge blob len %d too small", blob_len)); | 387 | cERROR(1, "challenge blob len %d too small", blob_len); |
388 | return -EINVAL; | 388 | return -EINVAL; |
389 | } | 389 | } |
390 | 390 | ||
391 | if (memcmp(pblob->Signature, "NTLMSSP", 8)) { | 391 | if (memcmp(pblob->Signature, "NTLMSSP", 8)) { |
392 | cERROR(1, ("blob signature incorrect %s", pblob->Signature)); | 392 | cERROR(1, "blob signature incorrect %s", pblob->Signature); |
393 | return -EINVAL; | 393 | return -EINVAL; |
394 | } | 394 | } |
395 | if (pblob->MessageType != NtLmChallenge) { | 395 | if (pblob->MessageType != NtLmChallenge) { |
396 | cERROR(1, ("Incorrect message type %d", pblob->MessageType)); | 396 | cERROR(1, "Incorrect message type %d", pblob->MessageType); |
397 | return -EINVAL; | 397 | return -EINVAL; |
398 | } | 398 | } |
399 | 399 | ||
@@ -583,7 +583,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
583 | 583 | ||
584 | type = ses->server->secType; | 584 | type = ses->server->secType; |
585 | 585 | ||
586 | cFYI(1, ("sess setup type %d", type)); | 586 | cFYI(1, "sess setup type %d", type); |
587 | ssetup_ntlmssp_authenticate: | 587 | ssetup_ntlmssp_authenticate: |
588 | if (phase == NtLmChallenge) | 588 | if (phase == NtLmChallenge) |
589 | phase = NtLmAuthenticate; /* if ntlmssp, now final phase */ | 589 | phase = NtLmAuthenticate; /* if ntlmssp, now final phase */ |
@@ -664,7 +664,7 @@ ssetup_ntlmssp_authenticate: | |||
664 | changed to do higher than lanman dialect and | 664 | changed to do higher than lanman dialect and |
665 | we reconnected would we ever calc signing_key? */ | 665 | we reconnected would we ever calc signing_key? */ |
666 | 666 | ||
667 | cFYI(1, ("Negotiating LANMAN setting up strings")); | 667 | cFYI(1, "Negotiating LANMAN setting up strings"); |
668 | /* Unicode not allowed for LANMAN dialects */ | 668 | /* Unicode not allowed for LANMAN dialects */ |
669 | ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); | 669 | ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); |
670 | #endif | 670 | #endif |
@@ -758,17 +758,17 @@ ssetup_ntlmssp_authenticate: | |||
758 | /* check version field to make sure that cifs.upcall is | 758 | /* check version field to make sure that cifs.upcall is |
759 | sending us a response in an expected form */ | 759 | sending us a response in an expected form */ |
760 | if (msg->version != CIFS_SPNEGO_UPCALL_VERSION) { | 760 | if (msg->version != CIFS_SPNEGO_UPCALL_VERSION) { |
761 | cERROR(1, ("incorrect version of cifs.upcall (expected" | 761 | cERROR(1, "incorrect version of cifs.upcall (expected" |
762 | " %d but got %d)", | 762 | " %d but got %d)", |
763 | CIFS_SPNEGO_UPCALL_VERSION, msg->version)); | 763 | CIFS_SPNEGO_UPCALL_VERSION, msg->version); |
764 | rc = -EKEYREJECTED; | 764 | rc = -EKEYREJECTED; |
765 | goto ssetup_exit; | 765 | goto ssetup_exit; |
766 | } | 766 | } |
767 | /* bail out if key is too long */ | 767 | /* bail out if key is too long */ |
768 | if (msg->sesskey_len > | 768 | if (msg->sesskey_len > |
769 | sizeof(ses->server->mac_signing_key.data.krb5)) { | 769 | sizeof(ses->server->mac_signing_key.data.krb5)) { |
770 | cERROR(1, ("Kerberos signing key too long (%u bytes)", | 770 | cERROR(1, "Kerberos signing key too long (%u bytes)", |
771 | msg->sesskey_len)); | 771 | msg->sesskey_len); |
772 | rc = -EOVERFLOW; | 772 | rc = -EOVERFLOW; |
773 | goto ssetup_exit; | 773 | goto ssetup_exit; |
774 | } | 774 | } |
@@ -796,7 +796,7 @@ ssetup_ntlmssp_authenticate: | |||
796 | /* BB: is this right? */ | 796 | /* BB: is this right? */ |
797 | ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); | 797 | ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); |
798 | #else /* ! CONFIG_CIFS_UPCALL */ | 798 | #else /* ! CONFIG_CIFS_UPCALL */ |
799 | cERROR(1, ("Kerberos negotiated but upcall support disabled!")); | 799 | cERROR(1, "Kerberos negotiated but upcall support disabled!"); |
800 | rc = -ENOSYS; | 800 | rc = -ENOSYS; |
801 | goto ssetup_exit; | 801 | goto ssetup_exit; |
802 | #endif /* CONFIG_CIFS_UPCALL */ | 802 | #endif /* CONFIG_CIFS_UPCALL */ |
@@ -804,12 +804,12 @@ ssetup_ntlmssp_authenticate: | |||
804 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 804 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
805 | if (type == RawNTLMSSP) { | 805 | if (type == RawNTLMSSP) { |
806 | if ((pSMB->req.hdr.Flags2 & SMBFLG2_UNICODE) == 0) { | 806 | if ((pSMB->req.hdr.Flags2 & SMBFLG2_UNICODE) == 0) { |
807 | cERROR(1, ("NTLMSSP requires Unicode support")); | 807 | cERROR(1, "NTLMSSP requires Unicode support"); |
808 | rc = -ENOSYS; | 808 | rc = -ENOSYS; |
809 | goto ssetup_exit; | 809 | goto ssetup_exit; |
810 | } | 810 | } |
811 | 811 | ||
812 | cFYI(1, ("ntlmssp session setup phase %d", phase)); | 812 | cFYI(1, "ntlmssp session setup phase %d", phase); |
813 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; | 813 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; |
814 | capabilities |= CAP_EXTENDED_SECURITY; | 814 | capabilities |= CAP_EXTENDED_SECURITY; |
815 | pSMB->req.Capabilities |= cpu_to_le32(capabilities); | 815 | pSMB->req.Capabilities |= cpu_to_le32(capabilities); |
@@ -827,7 +827,7 @@ ssetup_ntlmssp_authenticate: | |||
827 | on the response (challenge) */ | 827 | on the response (challenge) */ |
828 | smb_buf->Uid = ses->Suid; | 828 | smb_buf->Uid = ses->Suid; |
829 | } else { | 829 | } else { |
830 | cERROR(1, ("invalid phase %d", phase)); | 830 | cERROR(1, "invalid phase %d", phase); |
831 | rc = -ENOSYS; | 831 | rc = -ENOSYS; |
832 | goto ssetup_exit; | 832 | goto ssetup_exit; |
833 | } | 833 | } |
@@ -839,12 +839,12 @@ ssetup_ntlmssp_authenticate: | |||
839 | } | 839 | } |
840 | unicode_oslm_strings(&bcc_ptr, nls_cp); | 840 | unicode_oslm_strings(&bcc_ptr, nls_cp); |
841 | } else { | 841 | } else { |
842 | cERROR(1, ("secType %d not supported!", type)); | 842 | cERROR(1, "secType %d not supported!", type); |
843 | rc = -ENOSYS; | 843 | rc = -ENOSYS; |
844 | goto ssetup_exit; | 844 | goto ssetup_exit; |
845 | } | 845 | } |
846 | #else | 846 | #else |
847 | cERROR(1, ("secType %d not supported!", type)); | 847 | cERROR(1, "secType %d not supported!", type); |
848 | rc = -ENOSYS; | 848 | rc = -ENOSYS; |
849 | goto ssetup_exit; | 849 | goto ssetup_exit; |
850 | #endif | 850 | #endif |
@@ -862,7 +862,7 @@ ssetup_ntlmssp_authenticate: | |||
862 | CIFS_STD_OP /* not long */ | CIFS_LOG_ERROR); | 862 | CIFS_STD_OP /* not long */ | CIFS_LOG_ERROR); |
863 | /* SMB request buf freed in SendReceive2 */ | 863 | /* SMB request buf freed in SendReceive2 */ |
864 | 864 | ||
865 | cFYI(1, ("ssetup rc from sendrecv2 is %d", rc)); | 865 | cFYI(1, "ssetup rc from sendrecv2 is %d", rc); |
866 | 866 | ||
867 | pSMB = (SESSION_SETUP_ANDX *)iov[0].iov_base; | 867 | pSMB = (SESSION_SETUP_ANDX *)iov[0].iov_base; |
868 | smb_buf = (struct smb_hdr *)iov[0].iov_base; | 868 | smb_buf = (struct smb_hdr *)iov[0].iov_base; |
@@ -870,7 +870,7 @@ ssetup_ntlmssp_authenticate: | |||
870 | if ((type == RawNTLMSSP) && (smb_buf->Status.CifsError == | 870 | if ((type == RawNTLMSSP) && (smb_buf->Status.CifsError == |
871 | cpu_to_le32(NT_STATUS_MORE_PROCESSING_REQUIRED))) { | 871 | cpu_to_le32(NT_STATUS_MORE_PROCESSING_REQUIRED))) { |
872 | if (phase != NtLmNegotiate) { | 872 | if (phase != NtLmNegotiate) { |
873 | cERROR(1, ("Unexpected more processing error")); | 873 | cERROR(1, "Unexpected more processing error"); |
874 | goto ssetup_exit; | 874 | goto ssetup_exit; |
875 | } | 875 | } |
876 | /* NTLMSSP Negotiate sent now processing challenge (response) */ | 876 | /* NTLMSSP Negotiate sent now processing challenge (response) */ |
@@ -882,14 +882,14 @@ ssetup_ntlmssp_authenticate: | |||
882 | 882 | ||
883 | if ((smb_buf->WordCount != 3) && (smb_buf->WordCount != 4)) { | 883 | if ((smb_buf->WordCount != 3) && (smb_buf->WordCount != 4)) { |
884 | rc = -EIO; | 884 | rc = -EIO; |
885 | cERROR(1, ("bad word count %d", smb_buf->WordCount)); | 885 | cERROR(1, "bad word count %d", smb_buf->WordCount); |
886 | goto ssetup_exit; | 886 | goto ssetup_exit; |
887 | } | 887 | } |
888 | action = le16_to_cpu(pSMB->resp.Action); | 888 | action = le16_to_cpu(pSMB->resp.Action); |
889 | if (action & GUEST_LOGIN) | 889 | if (action & GUEST_LOGIN) |
890 | cFYI(1, ("Guest login")); /* BB mark SesInfo struct? */ | 890 | cFYI(1, "Guest login"); /* BB mark SesInfo struct? */ |
891 | ses->Suid = smb_buf->Uid; /* UID left in wire format (le) */ | 891 | ses->Suid = smb_buf->Uid; /* UID left in wire format (le) */ |
892 | cFYI(1, ("UID = %d ", ses->Suid)); | 892 | cFYI(1, "UID = %d ", ses->Suid); |
893 | /* response can have either 3 or 4 word count - Samba sends 3 */ | 893 | /* response can have either 3 or 4 word count - Samba sends 3 */ |
894 | /* and lanman response is 3 */ | 894 | /* and lanman response is 3 */ |
895 | bytes_remaining = BCC(smb_buf); | 895 | bytes_remaining = BCC(smb_buf); |
@@ -899,7 +899,7 @@ ssetup_ntlmssp_authenticate: | |||
899 | __u16 blob_len; | 899 | __u16 blob_len; |
900 | blob_len = le16_to_cpu(pSMB->resp.SecurityBlobLength); | 900 | blob_len = le16_to_cpu(pSMB->resp.SecurityBlobLength); |
901 | if (blob_len > bytes_remaining) { | 901 | if (blob_len > bytes_remaining) { |
902 | cERROR(1, ("bad security blob length %d", blob_len)); | 902 | cERROR(1, "bad security blob length %d", blob_len); |
903 | rc = -EINVAL; | 903 | rc = -EINVAL; |
904 | goto ssetup_exit; | 904 | goto ssetup_exit; |
905 | } | 905 | } |
@@ -933,7 +933,7 @@ ssetup_exit: | |||
933 | } | 933 | } |
934 | kfree(str_area); | 934 | kfree(str_area); |
935 | if (resp_buf_type == CIFS_SMALL_BUFFER) { | 935 | if (resp_buf_type == CIFS_SMALL_BUFFER) { |
936 | cFYI(1, ("ssetup freeing small buf %p", iov[0].iov_base)); | 936 | cFYI(1, "ssetup freeing small buf %p", iov[0].iov_base); |
937 | cifs_small_buf_release(iov[0].iov_base); | 937 | cifs_small_buf_release(iov[0].iov_base); |
938 | } else if (resp_buf_type == CIFS_LARGE_BUFFER) | 938 | } else if (resp_buf_type == CIFS_LARGE_BUFFER) |
939 | cifs_buf_release(iov[0].iov_base); | 939 | cifs_buf_release(iov[0].iov_base); |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index ad081fe7eb18..28f563cef5d7 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -43,7 +43,7 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server) | |||
43 | struct mid_q_entry *temp; | 43 | struct mid_q_entry *temp; |
44 | 44 | ||
45 | if (server == NULL) { | 45 | if (server == NULL) { |
46 | cERROR(1, ("Null TCP session in AllocMidQEntry")); | 46 | cERROR(1, "Null TCP session in AllocMidQEntry"); |
47 | return NULL; | 47 | return NULL; |
48 | } | 48 | } |
49 | 49 | ||
@@ -55,7 +55,7 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server) | |||
55 | temp->mid = smb_buffer->Mid; /* always LE */ | 55 | temp->mid = smb_buffer->Mid; /* always LE */ |
56 | temp->pid = current->pid; | 56 | temp->pid = current->pid; |
57 | temp->command = smb_buffer->Command; | 57 | temp->command = smb_buffer->Command; |
58 | cFYI(1, ("For smb_command %d", temp->command)); | 58 | cFYI(1, "For smb_command %d", temp->command); |
59 | /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */ | 59 | /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */ |
60 | /* when mid allocated can be before when sent */ | 60 | /* when mid allocated can be before when sent */ |
61 | temp->when_alloc = jiffies; | 61 | temp->when_alloc = jiffies; |
@@ -140,7 +140,7 @@ smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec) | |||
140 | total_len += iov[i].iov_len; | 140 | total_len += iov[i].iov_len; |
141 | 141 | ||
142 | smb_buffer->smb_buf_length = cpu_to_be32(smb_buffer->smb_buf_length); | 142 | smb_buffer->smb_buf_length = cpu_to_be32(smb_buffer->smb_buf_length); |
143 | cFYI(1, ("Sending smb: total_len %d", total_len)); | 143 | cFYI(1, "Sending smb: total_len %d", total_len); |
144 | dump_smb(smb_buffer, len); | 144 | dump_smb(smb_buffer, len); |
145 | 145 | ||
146 | i = 0; | 146 | i = 0; |
@@ -168,9 +168,8 @@ smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec) | |||
168 | reconnect which may clear the network problem. | 168 | reconnect which may clear the network problem. |
169 | */ | 169 | */ |
170 | if ((i >= 14) || (!server->noblocksnd && (i > 2))) { | 170 | if ((i >= 14) || (!server->noblocksnd && (i > 2))) { |
171 | cERROR(1, | 171 | cERROR(1, "sends on sock %p stuck for 15 seconds", |
172 | ("sends on sock %p stuck for 15 seconds", | 172 | ssocket); |
173 | ssocket)); | ||
174 | rc = -EAGAIN; | 173 | rc = -EAGAIN; |
175 | break; | 174 | break; |
176 | } | 175 | } |
@@ -184,13 +183,13 @@ smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec) | |||
184 | total_len = 0; | 183 | total_len = 0; |
185 | break; | 184 | break; |
186 | } else if (rc > total_len) { | 185 | } else if (rc > total_len) { |
187 | cERROR(1, ("sent %d requested %d", rc, total_len)); | 186 | cERROR(1, "sent %d requested %d", rc, total_len); |
188 | break; | 187 | break; |
189 | } | 188 | } |
190 | if (rc == 0) { | 189 | if (rc == 0) { |
191 | /* should never happen, letting socket clear before | 190 | /* should never happen, letting socket clear before |
192 | retrying is our only obvious option here */ | 191 | retrying is our only obvious option here */ |
193 | cERROR(1, ("tcp sent no data")); | 192 | cERROR(1, "tcp sent no data"); |
194 | msleep(500); | 193 | msleep(500); |
195 | continue; | 194 | continue; |
196 | } | 195 | } |
@@ -213,8 +212,8 @@ smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec) | |||
213 | } | 212 | } |
214 | 213 | ||
215 | if ((total_len > 0) && (total_len != smb_buf_length + 4)) { | 214 | if ((total_len > 0) && (total_len != smb_buf_length + 4)) { |
216 | cFYI(1, ("partial send (%d remaining), terminating session", | 215 | cFYI(1, "partial send (%d remaining), terminating session", |
217 | total_len)); | 216 | total_len); |
218 | /* If we have only sent part of an SMB then the next SMB | 217 | /* If we have only sent part of an SMB then the next SMB |
219 | could be taken as the remainder of this one. We need | 218 | could be taken as the remainder of this one. We need |
220 | to kill the socket so the server throws away the partial | 219 | to kill the socket so the server throws away the partial |
@@ -223,7 +222,7 @@ smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec) | |||
223 | } | 222 | } |
224 | 223 | ||
225 | if (rc < 0) { | 224 | if (rc < 0) { |
226 | cERROR(1, ("Error %d sending data on socket to server", rc)); | 225 | cERROR(1, "Error %d sending data on socket to server", rc); |
227 | } else | 226 | } else |
228 | rc = 0; | 227 | rc = 0; |
229 | 228 | ||
@@ -296,7 +295,7 @@ static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf, | |||
296 | } | 295 | } |
297 | 296 | ||
298 | if (ses->server->tcpStatus == CifsNeedReconnect) { | 297 | if (ses->server->tcpStatus == CifsNeedReconnect) { |
299 | cFYI(1, ("tcp session dead - return to caller to retry")); | 298 | cFYI(1, "tcp session dead - return to caller to retry"); |
300 | return -EAGAIN; | 299 | return -EAGAIN; |
301 | } | 300 | } |
302 | 301 | ||
@@ -348,7 +347,7 @@ static int wait_for_response(struct cifsSesInfo *ses, | |||
348 | lrt += time_to_wait; | 347 | lrt += time_to_wait; |
349 | if (time_after(jiffies, lrt)) { | 348 | if (time_after(jiffies, lrt)) { |
350 | /* No replies for time_to_wait. */ | 349 | /* No replies for time_to_wait. */ |
351 | cERROR(1, ("server not responding")); | 350 | cERROR(1, "server not responding"); |
352 | return -1; | 351 | return -1; |
353 | } | 352 | } |
354 | } else { | 353 | } else { |
@@ -379,7 +378,7 @@ SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses, | |||
379 | iov[0].iov_len = in_buf->smb_buf_length + 4; | 378 | iov[0].iov_len = in_buf->smb_buf_length + 4; |
380 | flags |= CIFS_NO_RESP; | 379 | flags |= CIFS_NO_RESP; |
381 | rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags); | 380 | rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags); |
382 | cFYI(DBG2, ("SendRcvNoRsp flags %d rc %d", flags, rc)); | 381 | cFYI(DBG2, "SendRcvNoRsp flags %d rc %d", flags, rc); |
383 | 382 | ||
384 | return rc; | 383 | return rc; |
385 | } | 384 | } |
@@ -402,7 +401,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
402 | 401 | ||
403 | if ((ses == NULL) || (ses->server == NULL)) { | 402 | if ((ses == NULL) || (ses->server == NULL)) { |
404 | cifs_small_buf_release(in_buf); | 403 | cifs_small_buf_release(in_buf); |
405 | cERROR(1, ("Null session")); | 404 | cERROR(1, "Null session"); |
406 | return -EIO; | 405 | return -EIO; |
407 | } | 406 | } |
408 | 407 | ||
@@ -471,7 +470,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
471 | else if (long_op == CIFS_BLOCKING_OP) | 470 | else if (long_op == CIFS_BLOCKING_OP) |
472 | timeout = 0x7FFFFFFF; /* large, but not so large as to wrap */ | 471 | timeout = 0x7FFFFFFF; /* large, but not so large as to wrap */ |
473 | else { | 472 | else { |
474 | cERROR(1, ("unknown timeout flag %d", long_op)); | 473 | cERROR(1, "unknown timeout flag %d", long_op); |
475 | rc = -EIO; | 474 | rc = -EIO; |
476 | goto out; | 475 | goto out; |
477 | } | 476 | } |
@@ -490,8 +489,8 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
490 | spin_lock(&GlobalMid_Lock); | 489 | spin_lock(&GlobalMid_Lock); |
491 | 490 | ||
492 | if (midQ->resp_buf == NULL) { | 491 | if (midQ->resp_buf == NULL) { |
493 | cERROR(1, ("No response to cmd %d mid %d", | 492 | cERROR(1, "No response to cmd %d mid %d", |
494 | midQ->command, midQ->mid)); | 493 | midQ->command, midQ->mid); |
495 | if (midQ->midState == MID_REQUEST_SUBMITTED) { | 494 | if (midQ->midState == MID_REQUEST_SUBMITTED) { |
496 | if (ses->server->tcpStatus == CifsExiting) | 495 | if (ses->server->tcpStatus == CifsExiting) |
497 | rc = -EHOSTDOWN; | 496 | rc = -EHOSTDOWN; |
@@ -504,7 +503,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
504 | if (rc != -EHOSTDOWN) { | 503 | if (rc != -EHOSTDOWN) { |
505 | if (midQ->midState == MID_RETRY_NEEDED) { | 504 | if (midQ->midState == MID_RETRY_NEEDED) { |
506 | rc = -EAGAIN; | 505 | rc = -EAGAIN; |
507 | cFYI(1, ("marking request for retry")); | 506 | cFYI(1, "marking request for retry"); |
508 | } else { | 507 | } else { |
509 | rc = -EIO; | 508 | rc = -EIO; |
510 | } | 509 | } |
@@ -521,8 +520,8 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
521 | receive_len = midQ->resp_buf->smb_buf_length; | 520 | receive_len = midQ->resp_buf->smb_buf_length; |
522 | 521 | ||
523 | if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) { | 522 | if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) { |
524 | cERROR(1, ("Frame too large received. Length: %d Xid: %d", | 523 | cERROR(1, "Frame too large received. Length: %d Xid: %d", |
525 | receive_len, xid)); | 524 | receive_len, xid); |
526 | rc = -EIO; | 525 | rc = -EIO; |
527 | goto out; | 526 | goto out; |
528 | } | 527 | } |
@@ -548,7 +547,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
548 | &ses->server->mac_signing_key, | 547 | &ses->server->mac_signing_key, |
549 | midQ->sequence_number+1); | 548 | midQ->sequence_number+1); |
550 | if (rc) { | 549 | if (rc) { |
551 | cERROR(1, ("Unexpected SMB signature")); | 550 | cERROR(1, "Unexpected SMB signature"); |
552 | /* BB FIXME add code to kill session */ | 551 | /* BB FIXME add code to kill session */ |
553 | } | 552 | } |
554 | } | 553 | } |
@@ -569,7 +568,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
569 | DeleteMidQEntry */ | 568 | DeleteMidQEntry */ |
570 | } else { | 569 | } else { |
571 | rc = -EIO; | 570 | rc = -EIO; |
572 | cFYI(1, ("Bad MID state?")); | 571 | cFYI(1, "Bad MID state?"); |
573 | } | 572 | } |
574 | 573 | ||
575 | out: | 574 | out: |
@@ -591,11 +590,11 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
591 | struct mid_q_entry *midQ; | 590 | struct mid_q_entry *midQ; |
592 | 591 | ||
593 | if (ses == NULL) { | 592 | if (ses == NULL) { |
594 | cERROR(1, ("Null smb session")); | 593 | cERROR(1, "Null smb session"); |
595 | return -EIO; | 594 | return -EIO; |
596 | } | 595 | } |
597 | if (ses->server == NULL) { | 596 | if (ses->server == NULL) { |
598 | cERROR(1, ("Null tcp session")); | 597 | cERROR(1, "Null tcp session"); |
599 | return -EIO; | 598 | return -EIO; |
600 | } | 599 | } |
601 | 600 | ||
@@ -607,8 +606,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
607 | use ses->maxReq */ | 606 | use ses->maxReq */ |
608 | 607 | ||
609 | if (in_buf->smb_buf_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { | 608 | if (in_buf->smb_buf_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { |
610 | cERROR(1, ("Illegal length, greater than maximum frame, %d", | 609 | cERROR(1, "Illegal length, greater than maximum frame, %d", |
611 | in_buf->smb_buf_length)); | 610 | in_buf->smb_buf_length); |
612 | return -EIO; | 611 | return -EIO; |
613 | } | 612 | } |
614 | 613 | ||
@@ -665,7 +664,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
665 | else if (long_op == CIFS_BLOCKING_OP) | 664 | else if (long_op == CIFS_BLOCKING_OP) |
666 | timeout = 0x7FFFFFFF; /* large but no so large as to wrap */ | 665 | timeout = 0x7FFFFFFF; /* large but no so large as to wrap */ |
667 | else { | 666 | else { |
668 | cERROR(1, ("unknown timeout flag %d", long_op)); | 667 | cERROR(1, "unknown timeout flag %d", long_op); |
669 | rc = -EIO; | 668 | rc = -EIO; |
670 | goto out; | 669 | goto out; |
671 | } | 670 | } |
@@ -681,8 +680,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
681 | 680 | ||
682 | spin_lock(&GlobalMid_Lock); | 681 | spin_lock(&GlobalMid_Lock); |
683 | if (midQ->resp_buf == NULL) { | 682 | if (midQ->resp_buf == NULL) { |
684 | cERROR(1, ("No response for cmd %d mid %d", | 683 | cERROR(1, "No response for cmd %d mid %d", |
685 | midQ->command, midQ->mid)); | 684 | midQ->command, midQ->mid); |
686 | if (midQ->midState == MID_REQUEST_SUBMITTED) { | 685 | if (midQ->midState == MID_REQUEST_SUBMITTED) { |
687 | if (ses->server->tcpStatus == CifsExiting) | 686 | if (ses->server->tcpStatus == CifsExiting) |
688 | rc = -EHOSTDOWN; | 687 | rc = -EHOSTDOWN; |
@@ -695,7 +694,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
695 | if (rc != -EHOSTDOWN) { | 694 | if (rc != -EHOSTDOWN) { |
696 | if (midQ->midState == MID_RETRY_NEEDED) { | 695 | if (midQ->midState == MID_RETRY_NEEDED) { |
697 | rc = -EAGAIN; | 696 | rc = -EAGAIN; |
698 | cFYI(1, ("marking request for retry")); | 697 | cFYI(1, "marking request for retry"); |
699 | } else { | 698 | } else { |
700 | rc = -EIO; | 699 | rc = -EIO; |
701 | } | 700 | } |
@@ -712,8 +711,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
712 | receive_len = midQ->resp_buf->smb_buf_length; | 711 | receive_len = midQ->resp_buf->smb_buf_length; |
713 | 712 | ||
714 | if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) { | 713 | if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) { |
715 | cERROR(1, ("Frame too large received. Length: %d Xid: %d", | 714 | cERROR(1, "Frame too large received. Length: %d Xid: %d", |
716 | receive_len, xid)); | 715 | receive_len, xid); |
717 | rc = -EIO; | 716 | rc = -EIO; |
718 | goto out; | 717 | goto out; |
719 | } | 718 | } |
@@ -736,7 +735,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
736 | &ses->server->mac_signing_key, | 735 | &ses->server->mac_signing_key, |
737 | midQ->sequence_number+1); | 736 | midQ->sequence_number+1); |
738 | if (rc) { | 737 | if (rc) { |
739 | cERROR(1, ("Unexpected SMB signature")); | 738 | cERROR(1, "Unexpected SMB signature"); |
740 | /* BB FIXME add code to kill session */ | 739 | /* BB FIXME add code to kill session */ |
741 | } | 740 | } |
742 | } | 741 | } |
@@ -753,7 +752,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
753 | BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf)); | 752 | BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf)); |
754 | } else { | 753 | } else { |
755 | rc = -EIO; | 754 | rc = -EIO; |
756 | cERROR(1, ("Bad MID state?")); | 755 | cERROR(1, "Bad MID state?"); |
757 | } | 756 | } |
758 | 757 | ||
759 | out: | 758 | out: |
@@ -824,13 +823,13 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
824 | struct cifsSesInfo *ses; | 823 | struct cifsSesInfo *ses; |
825 | 824 | ||
826 | if (tcon == NULL || tcon->ses == NULL) { | 825 | if (tcon == NULL || tcon->ses == NULL) { |
827 | cERROR(1, ("Null smb session")); | 826 | cERROR(1, "Null smb session"); |
828 | return -EIO; | 827 | return -EIO; |
829 | } | 828 | } |
830 | ses = tcon->ses; | 829 | ses = tcon->ses; |
831 | 830 | ||
832 | if (ses->server == NULL) { | 831 | if (ses->server == NULL) { |
833 | cERROR(1, ("Null tcp session")); | 832 | cERROR(1, "Null tcp session"); |
834 | return -EIO; | 833 | return -EIO; |
835 | } | 834 | } |
836 | 835 | ||
@@ -842,8 +841,8 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
842 | use ses->maxReq */ | 841 | use ses->maxReq */ |
843 | 842 | ||
844 | if (in_buf->smb_buf_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { | 843 | if (in_buf->smb_buf_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) { |
845 | cERROR(1, ("Illegal length, greater than maximum frame, %d", | 844 | cERROR(1, "Illegal length, greater than maximum frame, %d", |
846 | in_buf->smb_buf_length)); | 845 | in_buf->smb_buf_length); |
847 | return -EIO; | 846 | return -EIO; |
848 | } | 847 | } |
849 | 848 | ||
@@ -933,8 +932,8 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
933 | spin_unlock(&GlobalMid_Lock); | 932 | spin_unlock(&GlobalMid_Lock); |
934 | receive_len = midQ->resp_buf->smb_buf_length; | 933 | receive_len = midQ->resp_buf->smb_buf_length; |
935 | } else { | 934 | } else { |
936 | cERROR(1, ("No response for cmd %d mid %d", | 935 | cERROR(1, "No response for cmd %d mid %d", |
937 | midQ->command, midQ->mid)); | 936 | midQ->command, midQ->mid); |
938 | if (midQ->midState == MID_REQUEST_SUBMITTED) { | 937 | if (midQ->midState == MID_REQUEST_SUBMITTED) { |
939 | if (ses->server->tcpStatus == CifsExiting) | 938 | if (ses->server->tcpStatus == CifsExiting) |
940 | rc = -EHOSTDOWN; | 939 | rc = -EHOSTDOWN; |
@@ -947,7 +946,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
947 | if (rc != -EHOSTDOWN) { | 946 | if (rc != -EHOSTDOWN) { |
948 | if (midQ->midState == MID_RETRY_NEEDED) { | 947 | if (midQ->midState == MID_RETRY_NEEDED) { |
949 | rc = -EAGAIN; | 948 | rc = -EAGAIN; |
950 | cFYI(1, ("marking request for retry")); | 949 | cFYI(1, "marking request for retry"); |
951 | } else { | 950 | } else { |
952 | rc = -EIO; | 951 | rc = -EIO; |
953 | } | 952 | } |
@@ -958,8 +957,8 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
958 | } | 957 | } |
959 | 958 | ||
960 | if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) { | 959 | if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) { |
961 | cERROR(1, ("Frame too large received. Length: %d Xid: %d", | 960 | cERROR(1, "Frame too large received. Length: %d Xid: %d", |
962 | receive_len, xid)); | 961 | receive_len, xid); |
963 | rc = -EIO; | 962 | rc = -EIO; |
964 | goto out; | 963 | goto out; |
965 | } | 964 | } |
@@ -968,7 +967,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
968 | 967 | ||
969 | if ((out_buf == NULL) || (midQ->midState != MID_RESPONSE_RECEIVED)) { | 968 | if ((out_buf == NULL) || (midQ->midState != MID_RESPONSE_RECEIVED)) { |
970 | rc = -EIO; | 969 | rc = -EIO; |
971 | cERROR(1, ("Bad MID state?")); | 970 | cERROR(1, "Bad MID state?"); |
972 | goto out; | 971 | goto out; |
973 | } | 972 | } |
974 | 973 | ||
@@ -986,7 +985,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
986 | &ses->server->mac_signing_key, | 985 | &ses->server->mac_signing_key, |
987 | midQ->sequence_number+1); | 986 | midQ->sequence_number+1); |
988 | if (rc) { | 987 | if (rc) { |
989 | cERROR(1, ("Unexpected SMB signature")); | 988 | cERROR(1, "Unexpected SMB signature"); |
990 | /* BB FIXME add code to kill session */ | 989 | /* BB FIXME add code to kill session */ |
991 | } | 990 | } |
992 | } | 991 | } |
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index f555ce077d4f..a1509207bfa6 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -70,12 +70,12 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name) | |||
70 | return rc; | 70 | return rc; |
71 | } | 71 | } |
72 | if (ea_name == NULL) { | 72 | if (ea_name == NULL) { |
73 | cFYI(1, ("Null xattr names not supported")); | 73 | cFYI(1, "Null xattr names not supported"); |
74 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) | 74 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) |
75 | && (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) { | 75 | && (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) { |
76 | cFYI(1, | 76 | cFYI(1, |
77 | ("illegal xattr request %s (only user namespace supported)", | 77 | "illegal xattr request %s (only user namespace supported)", |
78 | ea_name)); | 78 | ea_name); |
79 | /* BB what if no namespace prefix? */ | 79 | /* BB what if no namespace prefix? */ |
80 | /* Should we just pass them to server, except for | 80 | /* Should we just pass them to server, except for |
81 | system and perhaps security prefixes? */ | 81 | system and perhaps security prefixes? */ |
@@ -131,19 +131,19 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
131 | search server for EAs or streams to | 131 | search server for EAs or streams to |
132 | returns as xattrs */ | 132 | returns as xattrs */ |
133 | if (value_size > MAX_EA_VALUE_SIZE) { | 133 | if (value_size > MAX_EA_VALUE_SIZE) { |
134 | cFYI(1, ("size of EA value too large")); | 134 | cFYI(1, "size of EA value too large"); |
135 | kfree(full_path); | 135 | kfree(full_path); |
136 | FreeXid(xid); | 136 | FreeXid(xid); |
137 | return -EOPNOTSUPP; | 137 | return -EOPNOTSUPP; |
138 | } | 138 | } |
139 | 139 | ||
140 | if (ea_name == NULL) { | 140 | if (ea_name == NULL) { |
141 | cFYI(1, ("Null xattr names not supported")); | 141 | cFYI(1, "Null xattr names not supported"); |
142 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) { | 142 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) { |
143 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 143 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
144 | goto set_ea_exit; | 144 | goto set_ea_exit; |
145 | if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) | 145 | if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) |
146 | cFYI(1, ("attempt to set cifs inode metadata")); | 146 | cFYI(1, "attempt to set cifs inode metadata"); |
147 | 147 | ||
148 | ea_name += 5; /* skip past user. prefix */ | 148 | ea_name += 5; /* skip past user. prefix */ |
149 | rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, | 149 | rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, |
@@ -169,9 +169,9 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
169 | ACL_TYPE_ACCESS, cifs_sb->local_nls, | 169 | ACL_TYPE_ACCESS, cifs_sb->local_nls, |
170 | cifs_sb->mnt_cifs_flags & | 170 | cifs_sb->mnt_cifs_flags & |
171 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 171 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
172 | cFYI(1, ("set POSIX ACL rc %d", rc)); | 172 | cFYI(1, "set POSIX ACL rc %d", rc); |
173 | #else | 173 | #else |
174 | cFYI(1, ("set POSIX ACL not supported")); | 174 | cFYI(1, "set POSIX ACL not supported"); |
175 | #endif | 175 | #endif |
176 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, | 176 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, |
177 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { | 177 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { |
@@ -182,13 +182,13 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
182 | ACL_TYPE_DEFAULT, cifs_sb->local_nls, | 182 | ACL_TYPE_DEFAULT, cifs_sb->local_nls, |
183 | cifs_sb->mnt_cifs_flags & | 183 | cifs_sb->mnt_cifs_flags & |
184 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 184 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
185 | cFYI(1, ("set POSIX default ACL rc %d", rc)); | 185 | cFYI(1, "set POSIX default ACL rc %d", rc); |
186 | #else | 186 | #else |
187 | cFYI(1, ("set default POSIX ACL not supported")); | 187 | cFYI(1, "set default POSIX ACL not supported"); |
188 | #endif | 188 | #endif |
189 | } else { | 189 | } else { |
190 | cFYI(1, ("illegal xattr request %s (only user namespace" | 190 | cFYI(1, "illegal xattr request %s (only user namespace" |
191 | " supported)", ea_name)); | 191 | " supported)", ea_name); |
192 | /* BB what if no namespace prefix? */ | 192 | /* BB what if no namespace prefix? */ |
193 | /* Should we just pass them to server, except for | 193 | /* Should we just pass them to server, except for |
194 | system and perhaps security prefixes? */ | 194 | system and perhaps security prefixes? */ |
@@ -235,13 +235,13 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, | |||
235 | /* return dos attributes as pseudo xattr */ | 235 | /* return dos attributes as pseudo xattr */ |
236 | /* return alt name if available as pseudo attr */ | 236 | /* return alt name if available as pseudo attr */ |
237 | if (ea_name == NULL) { | 237 | if (ea_name == NULL) { |
238 | cFYI(1, ("Null xattr names not supported")); | 238 | cFYI(1, "Null xattr names not supported"); |
239 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) { | 239 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) { |
240 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 240 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
241 | goto get_ea_exit; | 241 | goto get_ea_exit; |
242 | 242 | ||
243 | if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) { | 243 | if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) { |
244 | cFYI(1, ("attempt to query cifs inode metadata")); | 244 | cFYI(1, "attempt to query cifs inode metadata"); |
245 | /* revalidate/getattr then populate from inode */ | 245 | /* revalidate/getattr then populate from inode */ |
246 | } /* BB add else when above is implemented */ | 246 | } /* BB add else when above is implemented */ |
247 | ea_name += 5; /* skip past user. prefix */ | 247 | ea_name += 5; /* skip past user. prefix */ |
@@ -287,7 +287,7 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, | |||
287 | } | 287 | } |
288 | #endif /* EXPERIMENTAL */ | 288 | #endif /* EXPERIMENTAL */ |
289 | #else | 289 | #else |
290 | cFYI(1, ("query POSIX ACL not supported yet")); | 290 | cFYI(1, "query POSIX ACL not supported yet"); |
291 | #endif /* CONFIG_CIFS_POSIX */ | 291 | #endif /* CONFIG_CIFS_POSIX */ |
292 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, | 292 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, |
293 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { | 293 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { |
@@ -299,18 +299,18 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, | |||
299 | cifs_sb->mnt_cifs_flags & | 299 | cifs_sb->mnt_cifs_flags & |
300 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 300 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
301 | #else | 301 | #else |
302 | cFYI(1, ("query POSIX default ACL not supported yet")); | 302 | cFYI(1, "query POSIX default ACL not supported yet"); |
303 | #endif | 303 | #endif |
304 | } else if (strncmp(ea_name, | 304 | } else if (strncmp(ea_name, |
305 | CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) { | 305 | CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) { |
306 | cFYI(1, ("Trusted xattr namespace not supported yet")); | 306 | cFYI(1, "Trusted xattr namespace not supported yet"); |
307 | } else if (strncmp(ea_name, | 307 | } else if (strncmp(ea_name, |
308 | CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) { | 308 | CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) { |
309 | cFYI(1, ("Security xattr namespace not supported yet")); | 309 | cFYI(1, "Security xattr namespace not supported yet"); |
310 | } else | 310 | } else |
311 | cFYI(1, | 311 | cFYI(1, |
312 | ("illegal xattr request %s (only user namespace supported)", | 312 | "illegal xattr request %s (only user namespace supported)", |
313 | ea_name)); | 313 | ea_name); |
314 | 314 | ||
315 | /* We could add an additional check for streams ie | 315 | /* We could add an additional check for streams ie |
316 | if proc/fs/cifs/streamstoxattr is set then | 316 | if proc/fs/cifs/streamstoxattr is set then |