Commit 146d70ca authored by Andy Adamson's avatar Andy Adamson Committed by Trond Myklebust

NFS fix error return in nfs4_select_rw_stateid

Do not return an error when nfs4_copy_delegation_stateid succeeds.
Signed-off-by: default avatarAndy Adamson <andros@netapp.com>
Link: http://lkml.kernel.org/r/1392737765-41942-1-git-send-email-andros@netapp.com
Fixes: ef1820f9 (NFSv4: Don't try to recover NFSv4 locks when...)
Cc: NeilBrown <neilb@suse.de>
Cc: stable@vger.kernel.org # 3.12+
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 292f503c
...@@ -1015,8 +1015,11 @@ int nfs4_select_rw_stateid(nfs4_stateid *dst, struct nfs4_state *state, ...@@ -1015,8 +1015,11 @@ int nfs4_select_rw_stateid(nfs4_stateid *dst, struct nfs4_state *state,
if (ret == -EIO) if (ret == -EIO)
/* A lost lock - don't even consider delegations */ /* A lost lock - don't even consider delegations */
goto out; 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; goto out;
}
if (ret != -ENOENT) if (ret != -ENOENT)
/* nfs4_copy_delegation_stateid() didn't over-write /* nfs4_copy_delegation_stateid() didn't over-write
* dst, so it still has the lock stateid which we now * dst, so it still has the lock stateid which we now
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment