cifs: fix charset issue in reconnection
authorWinston Wen <wentao@uniontech.com>
Mon, 24 Jul 2023 02:10:57 +0000 (10:10 +0800)
committerSteve French <stfrench@microsoft.com>
Tue, 25 Jul 2023 05:31:24 +0000 (00:31 -0500)
commita43f95fdd39490f7b156fd126f1e90ec2d5553f1
tree0c04f59c861af7936b5802ce40beec5d46badc58
parentc1ed39ec116272935528ca9b348b8ee79b0791da
cifs: fix charset issue in reconnection

We need to specify charset, like "iocharset=utf-8", in mount options for
Chinese path if the nls_default don't support it, such as iso8859-1, the
default value for CONFIG_NLS_DEFAULT.

But now in reconnection the nls_default is used, instead of the one we
specified and used in mount, and this can lead to mount failure.

Signed-off-by: Winston Wen <wentao@uniontech.com>
Reviewed-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/cifssmb.c
fs/smb/client/connect.c
fs/smb/client/misc.c
fs/smb/client/smb2pdu.c