summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2014-02-18 15:36:05 (GMT)
committerJiri Slaby <jslaby@suse.cz>2014-03-05 16:13:42 (GMT)
commitf846327dad7a834b79db98e0111badb3121c441e (patch)
tree4c82799fed194ac9a694b2b02102d8c3cae659a1 /fs
parent3ca1ca4dd11f442e865a59487cf806c12d06907d (diff)
downloadlinux-fsl-qoriq-f846327dad7a834b79db98e0111badb3121c441e.tar.xz
NFS fix error return in nfs4_select_rw_stateid
commit 146d70caaa1b87f64597743429d7da4b8073d0c9 upstream. Do not return an error when nfs4_copy_delegation_stateid succeeds. Signed-off-by: Andy Adamson <andros@netapp.com> Link: http://lkml.kernel.org/r/1392737765-41942-1-git-send-email-andros@netapp.com Fixes: ef1820f9be27b (NFSv4: Don't try to recover NFSv4 locks when...) Cc: NeilBrown <neilb@suse.de> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index ebced8d..26c07f9 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1015,8 +1015,11 @@ int nfs4_select_rw_stateid(nfs4_stateid *dst, struct nfs4_state *state,
if (ret == -EIO)
/* A lost lock - don't even consider delegations */
goto out;
- if (nfs4_copy_delegation_stateid(dst, state->inode, fmode))
+ /* returns true if delegation stateid found and copied */
+ if (nfs4_copy_delegation_stateid(dst, state->inode, fmode)) {
+ ret = 0;
goto out;
+ }
if (ret != -ENOENT)
/* nfs4_copy_delegation_stateid() didn't over-write
* dst, so it still has the lock stateid which we now