]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: fix charset issue in reconnection
authorWinston Wen <wentao@uniontech.com>
Mon, 24 Jul 2023 02:10:57 +0000 (10:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:47:51 +0000 (09:47 +0200)
commit23b0014df6d1624539602a7e4d31f8d5f6fa1f7f
tree2057776484083b6c28a91abbba78ecd04b327d53
parente26c5d7d7e7bd619251139bc7e0266d7ec439615
cifs: fix charset issue in reconnection

[ Upstream commit a43f95fdd39490f7b156fd126f1e90ec2d5553f1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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