1 From f8ebf7a8ca35dde321f0cd385fee6f1950609367 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <trond.myklebust@primarydata.com>
3 Date: Fri, 17 Oct 2014 23:02:52 +0300
4 Subject: NFS: Don't try to reclaim delegation open state if recovery failed
6 From: Trond Myklebust <trond.myklebust@primarydata.com>
8 commit f8ebf7a8ca35dde321f0cd385fee6f1950609367 upstream.
10 If state recovery failed, then we should not attempt to reclaim delegated
13 http://lkml.kernel.org/r/CAN-5tyHwG=Cn2Q9KsHWadewjpTTy_K26ee+UnSvHvG4192p-Xw@mail.gmail.com
14 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 fs/nfs/delegation.c | 2 ++
19 1 file changed, 2 insertions(+)
21 --- a/fs/nfs/delegation.c
22 +++ b/fs/nfs/delegation.c
23 @@ -109,6 +109,8 @@ again:
25 if (!test_bit(NFS_DELEGATED_STATE, &state->flags))
27 + if (!nfs4_valid_open_stateid(state))
29 if (!nfs4_stateid_match(&state->stateid, stateid))
31 get_nfs_open_context(ctx);