Commit 6fd4ea88 authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French

cifs: don't create a temp nls in cifs_setup_ipc

just use the one that is already available in ctx
Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 387ec58f
...@@ -1478,7 +1478,6 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx) ...@@ -1478,7 +1478,6 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx)
{ {
int rc = 0, xid; int rc = 0, xid;
struct cifs_tcon *tcon; struct cifs_tcon *tcon;
struct nls_table *nls_codepage;
char unc[SERVER_NAME_LENGTH + sizeof("//x/IPC$")] = {0}; char unc[SERVER_NAME_LENGTH + sizeof("//x/IPC$")] = {0};
bool seal = false; bool seal = false;
struct TCP_Server_Info *server = ses->server; struct TCP_Server_Info *server = ses->server;
...@@ -1503,14 +1502,11 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx) ...@@ -1503,14 +1502,11 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx)
scnprintf(unc, sizeof(unc), "\\\\%s\\IPC$", server->hostname); scnprintf(unc, sizeof(unc), "\\\\%s\\IPC$", server->hostname);
/* cannot fail */
nls_codepage = load_nls_default();
xid = get_xid(); xid = get_xid();
tcon->ses = ses; tcon->ses = ses;
tcon->ipc = true; tcon->ipc = true;
tcon->seal = seal; tcon->seal = seal;
rc = server->ops->tree_connect(xid, ses, unc, tcon, nls_codepage); rc = server->ops->tree_connect(xid, ses, unc, tcon, ctx->local_nls);
free_xid(xid); free_xid(xid);
if (rc) { if (rc) {
...@@ -1523,7 +1519,6 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx) ...@@ -1523,7 +1519,6 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx)
ses->tcon_ipc = tcon; ses->tcon_ipc = tcon;
out: out:
unload_nls(nls_codepage);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment