diff options
Diffstat (limited to 'fs/cifs/dfs.c')
-rw-r--r-- | fs/cifs/dfs.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/fs/cifs/dfs.c b/fs/cifs/dfs.c index 0b15d7e9f818..ce21438cadec 100644 --- a/fs/cifs/dfs.c +++ b/fs/cifs/dfs.c @@ -9,28 +9,6 @@ #include "fs_context.h" #include "dfs.h" -/* Resolve UNC server name and set destination ip address in fs context */ -static int resolve_unc(const char *path, struct smb3_fs_context *ctx) -{ - int rc; - char *ip = NULL; - - rc = dns_resolve_server_name_to_ip(path, &ip, NULL); - if (rc < 0) { - cifs_dbg(FYI, "%s: failed to resolve UNC server name: %d\n", __func__, rc); - return rc; - } - - if (!cifs_convert_address((struct sockaddr *)&ctx->dstaddr, ip, strlen(ip))) { - cifs_dbg(VFS, "%s: could not determinate destination address\n", __func__); - rc = -EHOSTUNREACH; - } else - rc = 0; - - kfree(ip); - return rc; -} - /** * dfs_parse_target_referral - set fs context for dfs target referral * @@ -68,7 +46,7 @@ int dfs_parse_target_referral(const char *full_path, const struct dfs_info3_para if (rc) goto out; - rc = resolve_unc(path, ctx); + rc = dns_resolve_server_name_to_ip(path, (struct sockaddr *)&ctx->dstaddr, NULL); out: kfree(path); |