diff options
-rw-r--r-- | fs/cifs/connect.c | 11 |
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 { | |||
102 | bool sockopt_tcp_nodelay:1; | 102 | bool sockopt_tcp_nodelay:1; |
103 | unsigned short int port; | 103 | unsigned short int port; |
104 | char *prepath; | 104 | char *prepath; |
105 | struct nls_table *local_nls; | ||
105 | }; | 106 | }; |
106 | 107 | ||
107 | static int ipv4_connect(struct TCP_Server_Info *server); | 108 | static int ipv4_connect(struct TCP_Server_Info *server); |
@@ -2353,20 +2354,20 @@ try_mount_again: | |||
2353 | goto out; | 2354 | goto out; |
2354 | } | 2355 | } |
2355 | 2356 | ||
2356 | |||
2357 | /* this is needed for ASCII cp to Unicode converts */ | 2357 | /* this is needed for ASCII cp to Unicode converts */ |
2358 | if (volume_info->iocharset == NULL) { | 2358 | if (volume_info->iocharset == NULL) { |
2359 | cifs_sb->local_nls = load_nls_default(); | 2359 | /* load_nls_default cannot return null */ |
2360 | /* load_nls_default can not return null */ | 2360 | volume_info->local_nls = load_nls_default(); |
2361 | } else { | 2361 | } else { |
2362 | cifs_sb->local_nls = load_nls(volume_info->iocharset); | 2362 | volume_info->local_nls = load_nls(volume_info->iocharset); |
2363 | if (cifs_sb->local_nls == NULL) { | 2363 | if (volume_info->local_nls == NULL) { |
2364 | cERROR(1, "CIFS mount error: iocharset %s not found", | 2364 | cERROR(1, "CIFS mount error: iocharset %s not found", |
2365 | volume_info->iocharset); | 2365 | volume_info->iocharset); |
2366 | rc = -ELIBACC; | 2366 | rc = -ELIBACC; |
2367 | goto out; | 2367 | goto out; |
2368 | } | 2368 | } |
2369 | } | 2369 | } |
2370 | cifs_sb->local_nls = volume_info->local_nls; | ||
2370 | 2371 | ||
2371 | /* get a reference to a tcp session */ | 2372 | /* get a reference to a tcp session */ |
2372 | srvTcp = cifs_get_tcp_session(volume_info); | 2373 | srvTcp = cifs_get_tcp_session(volume_info); |