summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2020-12-14 09:40:21 +0300
committerSteve French <stfrench@microsoft.com>2020-12-14 18:26:30 +0300
commit6fd4ea88b59acaf2bffdaa14da313d1140b9c7c4 (patch)
tree8351f064850e94edda34e15c743cc9324bae71c5 /fs/cifs/connect.c
parent387ec58f339b0c45e3767395f11fa8dd3772131e (diff)
downloadlinux-6fd4ea88b59acaf2bffdaa14da313d1140b9c7c4.tar.xz
cifs: don't create a temp nls in cifs_setup_ipc
just use the one that is already available in ctx Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 2d43c313f13d..5ed7403ad5f2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1478,7 +1478,6 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx)
{
int rc = 0, xid;
struct cifs_tcon *tcon;
- struct nls_table *nls_codepage;
char unc[SERVER_NAME_LENGTH + sizeof("//x/IPC$")] = {0};
bool seal = false;
struct TCP_Server_Info *server = ses->server;
@@ -1503,14 +1502,11 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx)
scnprintf(unc, sizeof(unc), "\\\\%s\\IPC$", server->hostname);
- /* cannot fail */
- nls_codepage = load_nls_default();
-
xid = get_xid();
tcon->ses = ses;
tcon->ipc = true;
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);
if (rc) {
@@ -1523,7 +1519,6 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb3_fs_context *ctx)
ses->tcon_ipc = tcon;
out:
- unload_nls(nls_codepage);
return rc;
}