aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-03-22 08:42:57 -0400
committerSteve French <smfrench@gmail.com>2013-05-04 23:08:19 -0400
commit73a999fab313053ceebffa9293fadf5a306a58e8 (patch)
treec8ddbf93098567ab37902b972bf5a40c7ce3ea2f /fs/cifs
parent173192958d06b8d1eb44f56d74373052ad6a9a60 (diff)
cifs: ignore the unc= and prefixpath= mount options
...as advertised for 3.10. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c56
1 files changed, 5 insertions, 51 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 21b3a291c327..06394f5478a2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -95,9 +95,7 @@ enum {
95 95
96 /* Mount options which take string value */ 96 /* Mount options which take string value */
97 Opt_user, Opt_pass, Opt_ip, 97 Opt_user, Opt_pass, Opt_ip,
98 Opt_unc, Opt_domain, 98 Opt_domain, Opt_srcaddr, Opt_iocharset,
99 Opt_srcaddr, Opt_prefixpath,
100 Opt_iocharset,
101 Opt_netbiosname, Opt_servern, 99 Opt_netbiosname, Opt_servern,
102 Opt_ver, Opt_vers, Opt_sec, Opt_cache, 100 Opt_ver, Opt_vers, Opt_sec, Opt_cache,
103 101
@@ -193,14 +191,14 @@ static const match_table_t cifs_mount_option_tokens = {
193 { Opt_blank_ip, "addr=" }, 191 { Opt_blank_ip, "addr=" },
194 { Opt_ip, "ip=%s" }, 192 { Opt_ip, "ip=%s" },
195 { Opt_ip, "addr=%s" }, 193 { Opt_ip, "addr=%s" },
196 { Opt_unc, "unc=%s" }, 194 { Opt_ignore, "unc=%s" },
197 { Opt_unc, "target=%s" }, 195 { Opt_ignore, "target=%s" },
198 { Opt_unc, "path=%s" }, 196 { Opt_ignore, "path=%s" },
199 { Opt_domain, "dom=%s" }, 197 { Opt_domain, "dom=%s" },
200 { Opt_domain, "domain=%s" }, 198 { Opt_domain, "domain=%s" },
201 { Opt_domain, "workgroup=%s" }, 199 { Opt_domain, "workgroup=%s" },
202 { Opt_srcaddr, "srcaddr=%s" }, 200 { Opt_srcaddr, "srcaddr=%s" },
203 { Opt_prefixpath, "prefixpath=%s" }, 201 { Opt_ignore, "prefixpath=%s" },
204 { Opt_iocharset, "iocharset=%s" }, 202 { Opt_iocharset, "iocharset=%s" },
205 { Opt_netbiosname, "netbiosname=%s" }, 203 { Opt_netbiosname, "netbiosname=%s" },
206 { Opt_servern, "servern=%s" }, 204 { Opt_servern, "servern=%s" },
@@ -1660,30 +1658,6 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1660 } 1658 }
1661 got_ip = true; 1659 got_ip = true;
1662 break; 1660 break;
1663 case Opt_unc:
1664 string = vol->UNC;
1665 vol->UNC = match_strdup(args);
1666 if (vol->UNC == NULL)
1667 goto out_nomem;
1668
1669 convert_delimiter(vol->UNC, '\\');
1670 if (vol->UNC[0] != '\\' || vol->UNC[1] != '\\') {
1671 printk(KERN_ERR "CIFS: UNC Path does not "
1672 "begin with // or \\\\\n");
1673 goto cifs_parse_mount_err;
1674 }
1675
1676 /* Compare old unc= option to new one */
1677 if (!string || strcmp(string, vol->UNC))
1678 printk(KERN_WARNING "CIFS: the value of the "
1679 "unc= mount option does not match the "
1680 "device string. Using the unc= option "
1681 "for now. In 3.10, that option will "
1682 "be ignored and the contents of the "
1683 "device string will be used "
1684 "instead. (%s != %s)\n", string,
1685 vol->UNC);
1686 break;
1687 case Opt_domain: 1661 case Opt_domain:
1688 string = match_strdup(args); 1662 string = match_strdup(args);
1689 if (string == NULL) 1663 if (string == NULL)
@@ -1716,26 +1690,6 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1716 goto cifs_parse_mount_err; 1690 goto cifs_parse_mount_err;
1717 } 1691 }
1718 break; 1692 break;
1719 case Opt_prefixpath:
1720 /* skip over any leading delimiter */
1721 if (*args[0].from == '/' || *args[0].from == '\\')
1722 args[0].from++;
1723
1724 string = vol->prepath;
1725 vol->prepath = match_strdup(args);
1726 if (vol->prepath == NULL)
1727 goto out_nomem;
1728 /* Compare old prefixpath= option to new one */
1729 if (!string || strcmp(string, vol->prepath))
1730 printk(KERN_WARNING "CIFS: the value of the "
1731 "prefixpath= mount option does not "
1732 "match the device string. Using the "
1733 "prefixpath= option for now. In 3.10, "
1734 "that option will be ignored and the "
1735 "contents of the device string will be "
1736 "used instead.(%s != %s)\n", string,
1737 vol->prepath);
1738 break;
1739 case Opt_iocharset: 1693 case Opt_iocharset:
1740 string = match_strdup(args); 1694 string = match_strdup(args);
1741 if (string == NULL) 1695 if (string == NULL)