|
@@ -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
|