Commit 5ba12443 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Fix stateid recovery on revoked delegations

Ensure that we fix the non-NULL stateid case as well.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent ae2ffef3
...@@ -356,28 +356,16 @@ int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_ ...@@ -356,28 +356,16 @@ int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_
case 0: case 0:
return 0; return 0;
case -NFS4ERR_OPENMODE: case -NFS4ERR_OPENMODE:
if (inode && nfs4_have_delegation(inode, FMODE_READ)) {
nfs4_inode_return_delegation(inode);
exception->retry = 1;
return 0;
}
if (state == NULL)
break;
ret = nfs4_schedule_stateid_recovery(server, state);
if (ret < 0)
break;
goto wait_on_recovery;
case -NFS4ERR_DELEG_REVOKED: case -NFS4ERR_DELEG_REVOKED:
case -NFS4ERR_ADMIN_REVOKED: case -NFS4ERR_ADMIN_REVOKED:
case -NFS4ERR_BAD_STATEID: case -NFS4ERR_BAD_STATEID:
if (state == NULL) { if (inode && nfs4_have_delegation(inode, FMODE_READ)) {
if (inode && nfs4_have_delegation(inode,
FMODE_READ)) {
nfs4_inode_return_delegation(inode); nfs4_inode_return_delegation(inode);
exception->retry = 1; exception->retry = 1;
return 0;
} }
if (state == NULL)
break; break;
}
ret = nfs4_schedule_stateid_recovery(server, state); ret = nfs4_schedule_stateid_recovery(server, state);
if (ret < 0) if (ret < 0)
break; break;
......
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