summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust2013-11-20 18:57:19 +0100
committerTrond Myklebust2013-11-20 21:55:39 +0100
commit69794ad70cd3b600319f175fc0cbe7abd510791f (patch)
tree291dcd5cd9ffe1a2541e8def4e1afd82d6b2265f /fs/nfs/nfs4proc.c
parentNFSv4: Update list of irrecoverable errors on DELEGRETURN (diff)
downloadkernel-qcow2-linux-69794ad70cd3b600319f175fc0cbe7abd510791f.tar.gz
kernel-qcow2-linux-69794ad70cd3b600319f175fc0cbe7abd510791f.tar.xz
kernel-qcow2-linux-69794ad70cd3b600319f175fc0cbe7abd510791f.zip
NFSv4: close needs to handle NFS4ERR_ADMIN_REVOKED
Also ensure that we zero out the stateid mode when exiting Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ca36d0d50b7d..f01e2aa53210 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2518,9 +2518,8 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
calldata->roc_barrier);
nfs_set_open_stateid(state, &calldata->res.stateid, 0);
renew_lease(server, calldata->timestamp);
- nfs4_close_clear_stateid_flags(state,
- calldata->arg.fmode);
break;
+ case -NFS4ERR_ADMIN_REVOKED:
case -NFS4ERR_STALE_STATEID:
case -NFS4ERR_OLD_STATEID:
case -NFS4ERR_BAD_STATEID:
@@ -2528,9 +2527,13 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
if (calldata->arg.fmode == 0)
break;
default:
- if (nfs4_async_handle_error(task, server, state) == -EAGAIN)
+ if (nfs4_async_handle_error(task, server, state) == -EAGAIN) {
rpc_restart_call_prepare(task);
+ goto out_release;
+ }
}
+ nfs4_close_clear_stateid_flags(state, calldata->arg.fmode);
+out_release:
nfs_release_seqid(calldata->arg.seqid);
nfs_refresh_inode(calldata->inode, calldata->res.fattr);
dprintk("%s: done, ret = %d!\n", __func__, task->tk_status);