1 From 8b6cc4d6f841d31f72fe7478453759166d366274 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <Trond.Myklebust@netapp.com>
3 Date: Mon, 1 Apr 2013 15:34:05 -0400
4 Subject: NFSv4: Handle NFS4ERR_DELAY and NFS4ERR_GRACE in nfs4_open_delegation_recall
6 From: Trond Myklebust <Trond.Myklebust@netapp.com>
8 commit 8b6cc4d6f841d31f72fe7478453759166d366274 upstream.
10 A server shouldn't normally return NFS4ERR_GRACE if the client holds a
11 delegation, since no conflicting lock reclaims can be granted, however
12 the spec does not require the server to grant the open in this
15 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 fs/nfs/nfs4proc.c | 6 ++++++
20 1 file changed, 6 insertions(+)
22 --- a/fs/nfs/nfs4proc.c
23 +++ b/fs/nfs/nfs4proc.c
24 @@ -1362,6 +1362,12 @@ int nfs4_open_delegation_recall(struct n
28 + case -NFS4ERR_DELAY:
29 + case -NFS4ERR_GRACE:
30 + set_bit(NFS_DELEGATED_STATE, &state->flags);
35 err = nfs4_handle_exception(server, err, &exception);
36 } while (exception.retry);