summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-04-24 07:57:42 -0400
committerSteve French <sfrench@us.ibm.com>2010-04-26 18:54:54 +0000
commita5fc4ce01867842f6a9cc317035df3081302bffc (patch)
tree03e785a862a657a43b822f88704bb69d65e33e52 /fs/cifs/connect.c
parentfa588e0c57048b3d4bfcd772d80dc0615f83fd35 (diff)
downloadlinux-stable-a5fc4ce01867842f6a9cc317035df3081302bffc.tar.gz
linux-stable-a5fc4ce01867842f6a9cc317035df3081302bffc.tar.bz2
linux-stable-a5fc4ce01867842f6a9cc317035df3081302bffc.zip
cifs: track local_nls in volume info
Add a local_nls field to the smb_vol struct and keep a pointer to the local_nls in it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 58a2109e7b33..eb85dd8d510e 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -102,6 +102,7 @@ struct smb_vol {
bool sockopt_tcp_nodelay:1;
unsigned short int port;
char *prepath;
+ struct nls_table *local_nls;
};
static int ipv4_connect(struct TCP_Server_Info *server);
@@ -2353,20 +2354,20 @@ try_mount_again:
goto out;
}
-
/* this is needed for ASCII cp to Unicode converts */
if (volume_info->iocharset == NULL) {
- cifs_sb->local_nls = load_nls_default();
- /* load_nls_default can not return null */
+ /* load_nls_default cannot return null */
+ volume_info->local_nls = load_nls_default();
} else {
- cifs_sb->local_nls = load_nls(volume_info->iocharset);
- if (cifs_sb->local_nls == NULL) {
+ volume_info->local_nls = load_nls(volume_info->iocharset);
+ if (volume_info->local_nls == NULL) {
cERROR(1, "CIFS mount error: iocharset %s not found",
volume_info->iocharset);
rc = -ELIBACC;
goto out;
}
}
+ cifs_sb->local_nls = volume_info->local_nls;
/* get a reference to a tcp session */
srvTcp = cifs_get_tcp_session(volume_info);