Commit 68b78dcd authored by Trond Myklebust's avatar Trond Myklebust

NFSv4/pnfs: Handle RPC allocation errors in nfs4_proc_layoutget

If rpc_run_task() fails due to an allocation error, then bail out early.

Fixes: 910ad386 ("NFS: Fix memory allocation in rpc_alloc_task()")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 9d82819d
...@@ -9615,6 +9615,8 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout) ...@@ -9615,6 +9615,8 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout)
nfs4_init_sequence(&lgp->args.seq_args, &lgp->res.seq_res, 0, 0); nfs4_init_sequence(&lgp->args.seq_args, &lgp->res.seq_res, 0, 0);
task = rpc_run_task(&task_setup_data); task = rpc_run_task(&task_setup_data);
if (IS_ERR(task))
return ERR_CAST(task);
status = rpc_wait_for_completion_task(task); status = rpc_wait_for_completion_task(task);
if (status != 0) if (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