From patchwork Thu Apr 7 15:38:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 12805393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A40B3C4332F for ; Thu, 7 Apr 2022 15:44:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345080AbiDGPqx (ORCPT ); Thu, 7 Apr 2022 11:46:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345123AbiDGPqh (ORCPT ); Thu, 7 Apr 2022 11:46:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C18C6B54 for ; Thu, 7 Apr 2022 08:44:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9CEEE61EB6 for ; Thu, 7 Apr 2022 15:44:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E962C385B2 for ; Thu, 7 Apr 2022 15:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649346271; bh=JdLNTLNoccxME1ykAb6vaTCpoobIqzNPmf+4E3wWhbQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kagtjd/dZvZ/+AyyYVU6oxUubBo8nSgkDykUAzBT4yC9wrv/pRo/dEYEyKsF7DKQS 57PdCFqZQs4nJdtIdvR1m8tGZv9xe4wi3JP5hBfvR2xYyEldRA96EtNkmA1KZ3MIR8 xEFGO/UKo0+Gl42btaHgWJlLrxKdcFgYl2UEV2ajXtMsPxhP7rGhJihiFMmAdpTDJP d8AOXxJthBqWNMBPJQ2ZirrmtaZzFTTh20dJtvtCEi+C2LBiIG1V/8kCe9pnWRxleR KmktIWcvrF3yOTmKW4iQs+PPGOCquFPYTHvmu+pOU3zLNlcnDQmWYA9L9aTmqZGxwC xgy/Y4VNcNzKA== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 2/7] SUNRPC: Handle ENOMEM in call_transmit_status() Date: Thu, 7 Apr 2022 11:38:04 -0400 Message-Id: <20220407153809.1053261-2-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407153809.1053261-1-trondmy@kernel.org> References: <20220407153809.1053261-1-trondmy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust Both call_transmit() and call_bc_transmit() can now return ENOMEM, so let's make sure that we handle the errors gracefully. Signed-off-by: Trond Myklebust --- net/sunrpc/clnt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 3c7407104d54..07328f1d3885 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -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;