Skip to content

Commit

Permalink
NFSv4 release the sequence id in the return on close case
Browse files Browse the repository at this point in the history
Otherwise we deadlock if state recovery is initiated while we
sleep.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Andy Adamson authored and Trond Myklebust committed Apr 11, 2013
1 parent 314d7cc commit b9536ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2275,8 +2275,10 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
if (calldata->arg.fmode == 0) {
task->tk_msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CLOSE];
if (calldata->roc &&
pnfs_roc_drain(inode, &calldata->roc_barrier, task))
pnfs_roc_drain(inode, &calldata->roc_barrier, task)) {
nfs_release_seqid(calldata->arg.seqid);
goto out_wait;
}
}

nfs_fattr_init(calldata->res.fattr);
Expand Down

0 comments on commit b9536ad

Please sign in to comment.