diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-16 11:26:35 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-16 11:29:51 -0400 |
commit | 5ba12443a132420be45d089e4c4ac8a1e26b7da8 (patch) | |
tree | e46834d0c7da7e8e5f366a4e62cb957fa6a0bd47 /fs/nfs | |
parent | ae2ffef383fad723690a4c5bad70f7035fd7d71a (diff) |
NFSv4: Fix stateid recovery on revoked delegations
Ensure that we fix the non-NULL stateid case as well.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6bcdecd61125..0fc1b0cdda98 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -356,6 +356,9 @@ int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_ case 0: return 0; case -NFS4ERR_OPENMODE: + case -NFS4ERR_DELEG_REVOKED: + case -NFS4ERR_ADMIN_REVOKED: + case -NFS4ERR_BAD_STATEID: if (inode && nfs4_have_delegation(inode, FMODE_READ)) { nfs4_inode_return_delegation(inode); exception->retry = 1; @@ -367,21 +370,6 @@ int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_ if (ret < 0) break; goto wait_on_recovery; - case -NFS4ERR_DELEG_REVOKED: - case -NFS4ERR_ADMIN_REVOKED: - case -NFS4ERR_BAD_STATEID: - if (state == NULL) { - if (inode && nfs4_have_delegation(inode, - FMODE_READ)) { - nfs4_inode_return_delegation(inode); - exception->retry = 1; - } - break; - } - ret = nfs4_schedule_stateid_recovery(server, state); - if (ret < 0) - break; - goto wait_on_recovery; case -NFS4ERR_EXPIRED: if (state != NULL) { ret = nfs4_schedule_stateid_recovery(server, state); |