]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4.1: nfs41_clear_delegation_stateid shouldn't trust NFS_DELEGATED_STATE
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 12 Nov 2014 19:44:49 +0000 (14:44 -0500)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:38:24 +0000 (18:38 +0100)
commiteac34ad1b7643c51d9b4b96a2c6e034f49c7b7be
treecc22c7d0401142e711d79e40e151c52d22e1a25c
parent1f093632c55db7d63da16f158ed86be8836a40c4
NFSv4.1: nfs41_clear_delegation_stateid shouldn't trust NFS_DELEGATED_STATE

commit 0c116cadd94b16b30b1dd90d38b2784d9b39b01a upstream.

This patch removes the assumption made previously, that we only need to
check the delegation stateid when it matches the stateid on a cached
open.

If we believe that we hold a delegation for this file, then we must assume
that its stateid may have been revoked or expired too. If we don't test it
then our state recovery process may end up caching open/lock state in a
situation where it should not.
We therefore rename the function nfs41_clear_delegation_stateid as
nfs41_check_delegation_stateid, and change it to always run through the
delegation stateid test and recovery process as outlined in RFC5661.

http://lkml.kernel.org/r/CAN-5tyHwG=Cn2Q9KsHWadewjpTTy_K26ee+UnSvHvG4192p-Xw@mail.gmail.com
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/nfs/nfs4proc.c