diff options
author | Jeff Layton <jlayton@redhat.com> | 2013-05-24 07:40:06 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2013-05-24 14:08:31 -0400 |
commit | d9deef0a3f38bcc1c155e8d9a8b522404e5e648c (patch) | |
tree | 4a2b632b4ac08d96d29dd847a02f0a2410cdf101 /fs/cifs/dns_resolve.c | |
parent | 9c9c29e1af2ff0459087876e3800078555794b60 (diff) |
cifs: fix composing of mount options for DFS referrals
With the change to ignore the unc= and prefixpath= mount options, there
is no longer any need to add them to the options string when mounting.
By the same token, we now need to build a device name that includes the
prefixpath when mounting.
To make things neater, the delimiters on the devicename are changed
to '/' since that's preferred when mounting anyway.
v2: fix some comments and don't bother looking at whether there is
a prepath in the ref->node_name when deciding whether to pass
a prepath to cifs_build_devname.
v3: rebase on top of potential buffer overrun fix for stable
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dns_resolve.c')
-rw-r--r-- | fs/cifs/dns_resolve.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index e7512e497611..7ede7306599f 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * dns_resolve_server_name_to_ip - Resolve UNC server name to ip address. | 36 | * dns_resolve_server_name_to_ip - Resolve UNC server name to ip address. |
37 | * @unc: UNC path specifying the server | 37 | * @unc: UNC path specifying the server (with '/' as delimiter) |
38 | * @ip_addr: Where to return the IP address. | 38 | * @ip_addr: Where to return the IP address. |
39 | * | 39 | * |
40 | * The IP address will be returned in string form, and the caller is | 40 | * The IP address will be returned in string form, and the caller is |
@@ -64,7 +64,7 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
64 | hostname = unc + 2; | 64 | hostname = unc + 2; |
65 | 65 | ||
66 | /* Search for server name delimiter */ | 66 | /* Search for server name delimiter */ |
67 | sep = memchr(hostname, '\\', len); | 67 | sep = memchr(hostname, '/', len); |
68 | if (sep) | 68 | if (sep) |
69 | len = sep - hostname; | 69 | len = sep - hostname; |
70 | else | 70 | else |