]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.4.44/nfsv4-handle-nfs4err_delay-and-nfs4err_grace-in-nfs4_open_delegation_recall.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.4.44 / nfsv4-handle-nfs4err_delay-and-nfs4err_grace-in-nfs4_open_delegation_recall.patch
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
5
6 From: Trond Myklebust <Trond.Myklebust@netapp.com>
7
8 commit 8b6cc4d6f841d31f72fe7478453759166d366274 upstream.
9
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
13 instance
14
15 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18 ---
19 fs/nfs/nfs4proc.c | 6 ++++++
20 1 file changed, 6 insertions(+)
21
22 --- a/fs/nfs/nfs4proc.c
23 +++ b/fs/nfs/nfs4proc.c
24 @@ -1362,6 +1362,12 @@ int nfs4_open_delegation_recall(struct n
25 case -ENOMEM:
26 err = 0;
27 goto out;
28 + case -NFS4ERR_DELAY:
29 + case -NFS4ERR_GRACE:
30 + set_bit(NFS_DELEGATED_STATE, &state->flags);
31 + ssleep(1);
32 + err = -EAGAIN;
33 + goto out;
34 }
35 err = nfs4_handle_exception(server, err, &exception);
36 } while (exception.retry);