Adjust cifssb maximum read size
authorRohith Surabattula <rohiths@microsoft.com>
Mon, 7 Mar 2022 18:37:22 +0000 (18:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:58 +0000 (14:23 +0200)
commit9dd6bb11df64a2b57f494b775f892569c817d318
tree42d1bdf320094eebc9847ef4afb519392419cb04
parent1a55c48bba8161b417efa3a2580e56602d161d9d
Adjust cifssb maximum read size

[ Upstream commit 06a466565d54a1a42168f9033a062a3f5c40e73b ]

When session gets reconnected during mount then read size in super block fs context
gets set to zero and after negotiate, rsize is not modified which results in
incorrect read with requested bytes as zero. Fixes intermittent failure
of xfstest generic/240

Note that stable requires a different version of this patch which will be
sent to the stable mailing list.

Signed-off-by: Rohith Surabattula <rohiths@microsoft.com>
Acked-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/cifsfs.c
fs/cifs/file.c