NFSv4: Don't return the delegation when not needed by NFSv4.x (x>0)
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 20 Mar 2018 20:43:20 +0000 (16:43 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 10 Apr 2018 20:06:22 +0000 (16:06 -0400)
commitc01d36457dccf8e4c8991ab6570ff11554824710
tree6373d3295bea0bcee2c567b58551597337a508e3
parentc135cb39a907b85aef5389c191b6f02cffbadb8a
NFSv4: Don't return the delegation when not needed by NFSv4.x (x>0)

Starting with NFSv4.1, the server is able to deduce the client id from
the SEQUENCE op which means it can always figure out whether or not
the client is holding a delegation on a file that is being changed.
For that reason, RFC5661 does not require a delegation to be unconditionally
recalled on operations such as SETATTR, RENAME, or REMOVE.

Note that for now, we continue to return READ delegations since that is
still expected by the Linux knfsd server.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/delegation.c
fs/nfs/delegation.h
fs/nfs/nfs4proc.c