nfsd4: fix up replay_matches_cache()
authorScott Mayhew <smayhew@redhat.com>
Wed, 9 Oct 2019 19:11:37 +0000 (15:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 10:24:15 +0000 (11:24 +0100)
commitaf49ad548b93659e243dedecf1432b0f5eba3844
treefd5675103199773102104d88da358b7bd2c5fc46
parentb110cf2b747d5ea43c4bbca3ccdb8292203cba2d
nfsd4: fix up replay_matches_cache()

commit 6e73e92b155c868ff7fce9d108839668caf1d9be upstream.

When running an nfs stress test, I see quite a few cached replies that
don't match up with the actual request.  The first comment in
replay_matches_cache() makes sense, but the code doesn't seem to
match... fix it.

This isn't exactly a bugfix, as the server isn't required to catch every
case of a false retry.  So, we may as well do this, but if this is
fixing a problem then that suggests there's a client bug.

Fixes: 53da6a53e1d4 ("nfsd4: catch some false session retries")
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4state.c