Commit 244fcd2f authored by Trond Myklebust's avatar Trond Myklebust

NFS: Ensure we time out if a delegreturn does not complete

We can't allow delegreturn to hold up nfs4_evict_inode() forever,
since that can cause the memory shrinkers to block. This patch
therefore ensures that we eventually time out, and complete the
reclaim of the inode.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 59b56394
...@@ -6259,6 +6259,7 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata) ...@@ -6259,6 +6259,7 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata)
/* Fallthrough */ /* Fallthrough */
case -NFS4ERR_BAD_STATEID: case -NFS4ERR_BAD_STATEID:
case -NFS4ERR_STALE_STATEID: case -NFS4ERR_STALE_STATEID:
case -ETIMEDOUT:
task->tk_status = 0; task->tk_status = 0;
break; break;
case -NFS4ERR_OLD_STATEID: case -NFS4ERR_OLD_STATEID:
...@@ -6349,7 +6350,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred, ...@@ -6349,7 +6350,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred,
.rpc_client = server->client, .rpc_client = server->client,
.rpc_message = &msg, .rpc_message = &msg,
.callback_ops = &nfs4_delegreturn_ops, .callback_ops = &nfs4_delegreturn_ops,
.flags = RPC_TASK_ASYNC, .flags = RPC_TASK_ASYNC | RPC_TASK_TIMEOUT,
}; };
int status = 0; int status = 0;
......
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