Skip to content

Commit

Permalink
SUNRPC: Handle low memory situations in call_status()
Browse files Browse the repository at this point in the history
We need to handle ENFILE, ENOBUFS, and ENOMEM, because
xprt_wake_pending_tasks() can be called with any one of these due to
socket creation failures.

Fixes: b61d59f ("SUNRPC: xs_tcp_connect_worker{4,6}: merge common code")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Apr 7, 2022
1 parent d3c1503 commit 9d82819
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,11 @@ call_status(struct rpc_task *task)
case -EPIPE:
case -EAGAIN:
break;
case -ENFILE:
case -ENOBUFS:
case -ENOMEM:
rpc_delay(task, HZ>>2);
break;
case -EIO:
/* shutdown or soft timeout */
goto out_exit;
Expand Down

0 comments on commit 9d82819

Please sign in to comment.