NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 22 Sep 2016 17:38:54 +0000 (13:38 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 07:01:31 +0000 (03:01 -0400)
commitc7a128f02ef89b8f4da86098c707ff229172cf63
tree3f04e1fd4b456e9650166e007e8e0ea6891da982
parent79e7e444ed6cc249208798d1effea31945719c10
NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid

commit aa05c87f23efe417adc7ff9b4193b7201ec0dd79 upstream.

We must not allow the use of delegations that have been revoked or are
being returned.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Fixes: 869f9dfa4d6d ("NFSv4: Fix races between nfs_remove_bad_delegation()...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Tested-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/delegation.c