Skip to content

Commit 68b78dc

Browse files
author
Trond Myklebust
committed
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: 910ad38 ("NFS: Fix memory allocation in rpc_alloc_task()") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 9d82819 commit 68b78dc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/nfs/nfs4proc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9615,6 +9615,8 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout)
96159615
nfs4_init_sequence(&lgp->args.seq_args, &lgp->res.seq_res, 0, 0);
96169616

96179617
task = rpc_run_task(&task_setup_data);
9618+
if (IS_ERR(task))
9619+
return ERR_CAST(task);
96189620

96199621
status = rpc_wait_for_completion_task(task);
96209622
if (status != 0)

0 commit comments

Comments
 (0)