summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-15 14:47:36 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-15 14:47:36 -0500
commit72211dbe727f7c1451aa5adfcbd1197b090eb276 (patch)
tree1669a3a5e7d30e71451cd975161506b84bf6b1ad /fs/nfs/nfs4proc.c
parent68bf05efb7facbcf4a7b8d6b48a0800a90895511 (diff)
downloadblackbird-op-linux-72211dbe727f7c1451aa5adfcbd1197b090eb276.tar.gz
blackbird-op-linux-72211dbe727f7c1451aa5adfcbd1197b090eb276.zip
NFSv4: Release the sequence id before restarting a CLOSE rpc call
If the CLOSE or OPEN_DOWNGRADE call triggers a state recovery, and has to be resent, then we must release the seqid. Otherwise the open recovery will wait for the close to finish, which causes a deadlock. This is mainly a NFSv4.1 problem, although it can theoretically happen with NFSv4.0 too, in a OPEN_DOWNGRADE situation. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 019a009e73a0..198d51d17c13 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1835,11 +1835,10 @@ 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) {
- nfs_restart_rpc(task, server->nfs_client);
- return;
- }
+ if (nfs4_async_handle_error(task, server, state) == -EAGAIN)
+ rpc_restart_call_prepare(task);
}
+ nfs_release_seqid(calldata->arg.seqid);
nfs_refresh_inode(calldata->inode, calldata->res.fattr);
}
OpenPOWER on IntegriCloud