diff options
author | Andy Adamson <[email protected]> | 2014-02-18 10:36:05 -0500 |
---|---|---|
committer | Trond Myklebust <[email protected]> | 2014-02-19 09:31:56 -0500 |
commit | 146d70caaa1b87f64597743429d7da4b8073d0c9 (patch) | |
tree | 506c3dacecdf6bc0d4848942178866a09eb943c1 | |
parent | 292f503cade2b1d966239ef56a851e6897d1ba92 (diff) |
NFS fix error return in nfs4_select_rw_stateid
Do not return an error when nfs4_copy_delegation_stateid succeeds.
Signed-off-by: Andy Adamson <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Fixes: ef1820f9be27b (NFSv4: Don't try to recover NFSv4 locks when...)
Cc: NeilBrown <[email protected]>
Cc: [email protected] # 3.12+
Signed-off-by: Trond Myklebust <[email protected]>
-rw-r--r-- | fs/nfs/nfs4state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index e5be72518bd7..e1a47217c05e 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 |