diff options
-rw-r--r-- | fs/cifs/cifs_debug.c | 5 | ||||
-rw-r--r-- | fs/cifs/cifs_debug.h | 7 | ||||
-rw-r--r-- | fs/cifs/connect.c | 51 | ||||
-rw-r--r-- | fs/cifs/transport.c | 4 |
4 files changed, 25 insertions, 42 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 14e082ff1944..9c56ef776407 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
@@ -34,8 +34,7 @@ | |||
34 | void | 34 | void |
35 | cifs_dump_mem(char *label, void *data, int length) | 35 | cifs_dump_mem(char *label, void *data, int length) |
36 | { | 36 | { |
37 | printk(KERN_DEBUG "%s: dump of %d bytes of data at 0x%p\n", | 37 | pr_debug("%s: dump of %d bytes of data at 0x%p\n", label, length, data); |
38 | label, length, data); | ||
39 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 4, | 38 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 4, |
40 | data, length, true); | 39 | data, length, true); |
41 | } | 40 | } |
@@ -51,7 +50,7 @@ void cifs_vfs_err(const char *fmt, ...) | |||
51 | vaf.fmt = fmt; | 50 | vaf.fmt = fmt; |
52 | vaf.va = &args; | 51 | vaf.va = &args; |
53 | 52 | ||
54 | printk(KERN_ERR "CIFS VFS: %pV", &vaf); | 53 | pr_err("CIFS VFS: %pV", &vaf); |
55 | 54 | ||
56 | va_end(args); | 55 | va_end(args); |
57 | } | 56 | } |
diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h index c99b40fb609b..f40fbaca1b2a 100644 --- a/fs/cifs/cifs_debug.h +++ b/fs/cifs/cifs_debug.h | |||
@@ -53,13 +53,12 @@ __printf(1, 2) void cifs_vfs_err(const char *fmt, ...); | |||
53 | do { \ | 53 | do { \ |
54 | if (type == FYI) { \ | 54 | if (type == FYI) { \ |
55 | if (cifsFYI & CIFS_INFO) { \ | 55 | if (cifsFYI & CIFS_INFO) { \ |
56 | printk(KERN_DEBUG "%s: " fmt, \ | 56 | pr_debug("%s: " fmt, __FILE__, ##__VA_ARGS__); \ |
57 | __FILE__, ##__VA_ARGS__); \ | ||
58 | } \ | 57 | } \ |
59 | } else if (type == VFS) { \ | 58 | } else if (type == VFS) { \ |
60 | cifs_vfs_err(fmt, ##__VA_ARGS__); \ | 59 | cifs_vfs_err(fmt, ##__VA_ARGS__); \ |
61 | } else if (type == NOISY && type != 0) { \ | 60 | } else if (type == NOISY && type != 0) { \ |
62 | printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ | 61 | pr_debug(fmt, ##__VA_ARGS__); \ |
63 | } \ | 62 | } \ |
64 | } while (0) | 63 | } while (0) |
65 | 64 | ||
@@ -71,7 +70,7 @@ do { \ | |||
71 | #define cifs_dbg(type, fmt, ...) \ | 70 | #define cifs_dbg(type, fmt, ...) \ |
72 | do { \ | 71 | do { \ |
73 | if (0) \ | 72 | if (0) \ |
74 | printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ | 73 | pr_debug(fmt, ##__VA_ARGS__); \ |
75 | } while (0) | 74 | } while (0) |
76 | #endif | 75 | #endif |
77 | 76 | ||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 24fa08d261fb..2a772da16b83 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1466,9 +1466,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1466 | vol->seal = 1; | 1466 | vol->seal = 1; |
1467 | break; | 1467 | break; |
1468 | case Opt_noac: | 1468 | case Opt_noac: |
1469 | printk(KERN_WARNING "CIFS: Mount option noac not " | 1469 | pr_warn("CIFS: Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n"); |
1470 | "supported. Instead set " | ||
1471 | "/proc/fs/cifs/LookupCacheEnabled to 0\n"); | ||
1472 | break; | 1470 | break; |
1473 | case Opt_fsc: | 1471 | case Opt_fsc: |
1474 | #ifndef CONFIG_CIFS_FSCACHE | 1472 | #ifndef CONFIG_CIFS_FSCACHE |
@@ -1598,7 +1596,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1598 | 1596 | ||
1599 | if (strnlen(string, CIFS_MAX_USERNAME_LEN) > | 1597 | if (strnlen(string, CIFS_MAX_USERNAME_LEN) > |
1600 | CIFS_MAX_USERNAME_LEN) { | 1598 | CIFS_MAX_USERNAME_LEN) { |
1601 | printk(KERN_WARNING "CIFS: username too long\n"); | 1599 | pr_warn("CIFS: username too long\n"); |
1602 | goto cifs_parse_mount_err; | 1600 | goto cifs_parse_mount_err; |
1603 | } | 1601 | } |
1604 | vol->username = kstrdup(string, GFP_KERNEL); | 1602 | vol->username = kstrdup(string, GFP_KERNEL); |
@@ -1662,8 +1660,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1662 | temp_len = strlen(value); | 1660 | temp_len = strlen(value); |
1663 | vol->password = kzalloc(temp_len+1, GFP_KERNEL); | 1661 | vol->password = kzalloc(temp_len+1, GFP_KERNEL); |
1664 | if (vol->password == NULL) { | 1662 | if (vol->password == NULL) { |
1665 | printk(KERN_WARNING "CIFS: no memory " | 1663 | pr_warn("CIFS: no memory for password\n"); |
1666 | "for password\n"); | ||
1667 | goto cifs_parse_mount_err; | 1664 | goto cifs_parse_mount_err; |
1668 | } | 1665 | } |
1669 | 1666 | ||
@@ -1687,8 +1684,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1687 | 1684 | ||
1688 | if (!cifs_convert_address(dstaddr, string, | 1685 | if (!cifs_convert_address(dstaddr, string, |
1689 | strlen(string))) { | 1686 | strlen(string))) { |
1690 | printk(KERN_ERR "CIFS: bad ip= option (%s).\n", | 1687 | pr_err("CIFS: bad ip= option (%s).\n", string); |
1691 | string); | ||
1692 | goto cifs_parse_mount_err; | 1688 | goto cifs_parse_mount_err; |
1693 | } | 1689 | } |
1694 | got_ip = true; | 1690 | got_ip = true; |
@@ -1700,15 +1696,13 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1700 | 1696 | ||
1701 | if (strnlen(string, CIFS_MAX_DOMAINNAME_LEN) | 1697 | if (strnlen(string, CIFS_MAX_DOMAINNAME_LEN) |
1702 | == CIFS_MAX_DOMAINNAME_LEN) { | 1698 | == CIFS_MAX_DOMAINNAME_LEN) { |
1703 | printk(KERN_WARNING "CIFS: domain name too" | 1699 | pr_warn("CIFS: domain name too long\n"); |
1704 | " long\n"); | ||
1705 | goto cifs_parse_mount_err; | 1700 | goto cifs_parse_mount_err; |
1706 | } | 1701 | } |
1707 | 1702 | ||
1708 | vol->domainname = kstrdup(string, GFP_KERNEL); | 1703 | vol->domainname = kstrdup(string, GFP_KERNEL); |
1709 | if (!vol->domainname) { | 1704 | if (!vol->domainname) { |
1710 | printk(KERN_WARNING "CIFS: no memory " | 1705 | pr_warn("CIFS: no memory for domainname\n"); |
1711 | "for domainname\n"); | ||
1712 | goto cifs_parse_mount_err; | 1706 | goto cifs_parse_mount_err; |
1713 | } | 1707 | } |
1714 | cifs_dbg(FYI, "Domain name set\n"); | 1708 | cifs_dbg(FYI, "Domain name set\n"); |
@@ -1721,8 +1715,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1721 | if (!cifs_convert_address( | 1715 | if (!cifs_convert_address( |
1722 | (struct sockaddr *)&vol->srcaddr, | 1716 | (struct sockaddr *)&vol->srcaddr, |
1723 | string, strlen(string))) { | 1717 | string, strlen(string))) { |
1724 | printk(KERN_WARNING "CIFS: Could not parse" | 1718 | pr_warn("CIFS: Could not parse srcaddr: %s\n", |
1725 | " srcaddr: %s\n", string); | 1719 | string); |
1726 | goto cifs_parse_mount_err; | 1720 | goto cifs_parse_mount_err; |
1727 | } | 1721 | } |
1728 | break; | 1722 | break; |
@@ -1732,8 +1726,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1732 | goto out_nomem; | 1726 | goto out_nomem; |
1733 | 1727 | ||
1734 | if (strnlen(string, 1024) >= 65) { | 1728 | if (strnlen(string, 1024) >= 65) { |
1735 | printk(KERN_WARNING "CIFS: iocharset name " | 1729 | pr_warn("CIFS: iocharset name too long.\n"); |
1736 | "too long.\n"); | ||
1737 | goto cifs_parse_mount_err; | 1730 | goto cifs_parse_mount_err; |
1738 | } | 1731 | } |
1739 | 1732 | ||
@@ -1741,8 +1734,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1741 | vol->iocharset = kstrdup(string, | 1734 | vol->iocharset = kstrdup(string, |
1742 | GFP_KERNEL); | 1735 | GFP_KERNEL); |
1743 | if (!vol->iocharset) { | 1736 | if (!vol->iocharset) { |
1744 | printk(KERN_WARNING "CIFS: no memory" | 1737 | pr_warn("CIFS: no memory for charset\n"); |
1745 | "for charset\n"); | ||
1746 | goto cifs_parse_mount_err; | 1738 | goto cifs_parse_mount_err; |
1747 | } | 1739 | } |
1748 | } | 1740 | } |
@@ -1773,9 +1765,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1773 | * set at top of the function | 1765 | * set at top of the function |
1774 | */ | 1766 | */ |
1775 | if (i == RFC1001_NAME_LEN && string[i] != 0) | 1767 | if (i == RFC1001_NAME_LEN && string[i] != 0) |
1776 | printk(KERN_WARNING "CIFS: netbiosname" | 1768 | pr_warn("CIFS: netbiosname longer than 15 truncated.\n"); |
1777 | " longer than 15 truncated.\n"); | ||
1778 | |||
1779 | break; | 1769 | break; |
1780 | case Opt_servern: | 1770 | case Opt_servern: |
1781 | /* servernetbiosname specified override *SMBSERVER */ | 1771 | /* servernetbiosname specified override *SMBSERVER */ |
@@ -1801,8 +1791,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1801 | /* The string has 16th byte zero still from | 1791 | /* The string has 16th byte zero still from |
1802 | set at top of the function */ | 1792 | set at top of the function */ |
1803 | if (i == RFC1001_NAME_LEN && string[i] != 0) | 1793 | if (i == RFC1001_NAME_LEN && string[i] != 0) |
1804 | printk(KERN_WARNING "CIFS: server net" | 1794 | pr_warn("CIFS: server netbiosname longer than 15 truncated.\n"); |
1805 | "biosname longer than 15 truncated.\n"); | ||
1806 | break; | 1795 | break; |
1807 | case Opt_ver: | 1796 | case Opt_ver: |
1808 | string = match_strdup(args); | 1797 | string = match_strdup(args); |
@@ -1814,8 +1803,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1814 | break; | 1803 | break; |
1815 | } | 1804 | } |
1816 | /* For all other value, error */ | 1805 | /* For all other value, error */ |
1817 | printk(KERN_WARNING "CIFS: Invalid version" | 1806 | pr_warn("CIFS: Invalid version specified\n"); |
1818 | " specified\n"); | ||
1819 | goto cifs_parse_mount_err; | 1807 | goto cifs_parse_mount_err; |
1820 | case Opt_vers: | 1808 | case Opt_vers: |
1821 | string = match_strdup(args); | 1809 | string = match_strdup(args); |
@@ -1856,7 +1844,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1856 | } | 1844 | } |
1857 | 1845 | ||
1858 | if (!sloppy && invalid) { | 1846 | if (!sloppy && invalid) { |
1859 | printk(KERN_ERR "CIFS: Unknown mount option \"%s\"\n", invalid); | 1847 | pr_err("CIFS: Unknown mount option \"%s\"\n", invalid); |
1860 | goto cifs_parse_mount_err; | 1848 | goto cifs_parse_mount_err; |
1861 | } | 1849 | } |
1862 | 1850 | ||
@@ -1882,8 +1870,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1882 | /* No ip= option specified? Try to get it from UNC */ | 1870 | /* No ip= option specified? Try to get it from UNC */ |
1883 | if (!cifs_convert_address(dstaddr, &vol->UNC[2], | 1871 | if (!cifs_convert_address(dstaddr, &vol->UNC[2], |
1884 | strlen(&vol->UNC[2]))) { | 1872 | strlen(&vol->UNC[2]))) { |
1885 | printk(KERN_ERR "Unable to determine destination " | 1873 | pr_err("Unable to determine destination address.\n"); |
1886 | "address.\n"); | ||
1887 | goto cifs_parse_mount_err; | 1874 | goto cifs_parse_mount_err; |
1888 | } | 1875 | } |
1889 | } | 1876 | } |
@@ -1894,20 +1881,18 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1894 | if (uid_specified) | 1881 | if (uid_specified) |
1895 | vol->override_uid = override_uid; | 1882 | vol->override_uid = override_uid; |
1896 | else if (override_uid == 1) | 1883 | else if (override_uid == 1) |
1897 | printk(KERN_NOTICE "CIFS: ignoring forceuid mount option " | 1884 | pr_notice("CIFS: ignoring forceuid mount option specified with no uid= option.\n"); |
1898 | "specified with no uid= option.\n"); | ||
1899 | 1885 | ||
1900 | if (gid_specified) | 1886 | if (gid_specified) |
1901 | vol->override_gid = override_gid; | 1887 | vol->override_gid = override_gid; |
1902 | else if (override_gid == 1) | 1888 | else if (override_gid == 1) |
1903 | printk(KERN_NOTICE "CIFS: ignoring forcegid mount option " | 1889 | pr_notice("CIFS: ignoring forcegid mount option specified with no gid= option.\n"); |
1904 | "specified with no gid= option.\n"); | ||
1905 | 1890 | ||
1906 | kfree(mountdata_copy); | 1891 | kfree(mountdata_copy); |
1907 | return 0; | 1892 | return 0; |
1908 | 1893 | ||
1909 | out_nomem: | 1894 | out_nomem: |
1910 | printk(KERN_WARNING "Could not allocate temporary buffer\n"); | 1895 | pr_warn("Could not allocate temporary buffer\n"); |
1911 | cifs_parse_mount_err: | 1896 | cifs_parse_mount_err: |
1912 | kfree(string); | 1897 | kfree(string); |
1913 | kfree(mountdata_copy); | 1898 | kfree(mountdata_copy); |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 9d087f4e7d4e..126f46b887cc 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -99,9 +99,9 @@ DeleteMidQEntry(struct mid_q_entry *midEntry) | |||
99 | something is wrong, unless it is quite a slow link or server */ | 99 | something is wrong, unless it is quite a slow link or server */ |
100 | if ((now - midEntry->when_alloc) > HZ) { | 100 | if ((now - midEntry->when_alloc) > HZ) { |
101 | if ((cifsFYI & CIFS_TIMER) && (midEntry->command != command)) { | 101 | if ((cifsFYI & CIFS_TIMER) && (midEntry->command != command)) { |
102 | printk(KERN_DEBUG " CIFS slow rsp: cmd %d mid %llu", | 102 | pr_debug(" CIFS slow rsp: cmd %d mid %llu", |
103 | midEntry->command, midEntry->mid); | 103 | midEntry->command, midEntry->mid); |
104 | printk(" A: 0x%lx S: 0x%lx R: 0x%lx\n", | 104 | pr_info(" A: 0x%lx S: 0x%lx R: 0x%lx\n", |
105 | now - midEntry->when_alloc, | 105 | now - midEntry->when_alloc, |
106 | now - midEntry->when_sent, | 106 | now - midEntry->when_sent, |
107 | now - midEntry->when_received); | 107 | now - midEntry->when_received); |