]> git.baikalelectronics.ru Git - kernel.git/commitdiff
SUNRPC: Handle ENOMEM in call_transmit_status()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 7 Apr 2022 03:18:57 +0000 (23:18 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 7 Apr 2022 20:20:00 +0000 (16:20 -0400)
Both call_transmit() and call_bc_transmit() can now return ENOMEM, so
let's make sure that we handle the errors gracefully.

Fixes: 3afeef2dbd13 ("SUNRPC: Convert socket page send code to use iov_iter()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/clnt.c

index 3c7407104d5456709ce88736d44b4b90ffe3f525..07328f1d3885a2abd53ea4f1bbe34ce640cbeafa 100644 (file)
@@ -2200,6 +2200,7 @@ call_transmit_status(struct rpc_task *task)
                 * socket just returned a connection error,
                 * then hold onto the transport lock.
                 */
+       case -ENOMEM:
        case -ENOBUFS:
                rpc_delay(task, HZ>>2);
                fallthrough;
@@ -2283,6 +2284,7 @@ call_bc_transmit_status(struct rpc_task *task)
        case -ENOTCONN:
        case -EPIPE:
                break;
+       case -ENOMEM:
        case -ENOBUFS:
                rpc_delay(task, HZ>>2);
                fallthrough;