Trond Myklebust a88fd5847b NFSv4.1: Fix the r/wsize checking
commit 943cff67b842839f4f35364ba2db5c2d3f025d94 upstream.

The intention of nfs4_session_set_rwsize() was to cap the r/wsize to the
buffer sizes negotiated by the CREATE_SESSION. The initial code had a
bug whereby we would not check the values negotiated by nfs_probe_fsinfo()
(the assumption being that CREATE_SESSION will always negotiate buffer values
that are sane w.r.t. the server's preferred r/wsizes) but would only check
values set by the user in the 'mount' command.

The code was changed in 4.11 to _always_ set the r/wsize, meaning that we
now never use the server preferred r/wsizes. This is the regression that
this patch fixes.
Also rename the function to nfs4_session_limit_rwsize() in order to avoid
future confusion.

Fixes: 033853325fe3 (NFSv4.1 respect server's max size in CREATE_SESSION")
Cc: stable@vger.kernel.org # v4.11+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:27:35 +01:00
..
2016-12-02 09:09:01 +01:00
2017-12-16 10:33:55 +01:00
2015-04-23 15:16:14 -04:00
2015-02-03 11:06:34 -08:00
2015-10-08 10:45:51 -04:00
2018-11-21 09:27:35 +01:00
2016-04-20 15:42:13 +09:00
2015-04-23 15:16:14 -04:00
2015-04-23 15:16:14 -04:00
2015-10-15 16:07:36 -04:00
2015-10-15 16:07:21 -04:00
2015-08-20 13:43:53 -05:00
2015-09-23 08:55:32 -04:00