linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: bfields@fieldses.org
Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: [PATCH v1 3/4] svcrdma: Remove try_module_get from backchannel
Date: Mon, 01 Oct 2018 14:16:06 -0400	[thread overview]
Message-ID: <20181001181606.2305.48044.stgit@klimt.1015granger.net> (raw)
In-Reply-To: <20181001181414.2305.94635.stgit@klimt.1015granger.net>

Since commit ffe1f0df5862 ("rpcrdma: Merge svcrdma and xprtrdma
modules into one"), the forward and backchannel components are part
of the same kernel module. A separate try_module_get() call in the
backchannel code is no longer necessary.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xprtrdma/svc_rdma_backchannel.c |   14 --------------
 1 file changed, 14 deletions(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c
index 642f031..7e188bc 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c
@@ -5,8 +5,6 @@
  * Support for backward direction RPCs on RPC/RDMA (server-side).
  */
 
-#include <linux/module.h>
-
 #include <linux/sunrpc/svc_rdma.h>
 
 #include "xprt_rdma.h"
@@ -255,7 +253,6 @@ static int svc_rdma_bc_sendto(struct svcxprt_rdma *rdma,
 	dprintk("svcrdma: %s: xprt %p\n", __func__, xprt);
 
 	xprt_free(xprt);
-	module_put(THIS_MODULE);
 }
 
 static const struct rpc_xprt_ops xprt_rdma_bc_procs = {
@@ -327,20 +324,9 @@ static int svc_rdma_bc_sendto(struct svcxprt_rdma *rdma,
 	args->bc_xprt->xpt_bc_xprt = xprt;
 	xprt->bc_xprt = args->bc_xprt;
 
-	if (!try_module_get(THIS_MODULE))
-		goto out_fail;
-
 	/* Final put for backchannel xprt is in __svc_rdma_free */
 	xprt_get(xprt);
 	return xprt;
-
-out_fail:
-	xprt_rdma_free_addresses(xprt);
-	args->bc_xprt->xpt_bc_xprt = NULL;
-	args->bc_xprt->xpt_bc_xps = NULL;
-	xprt_put(xprt);
-	xprt_free(xprt);
-	return ERR_PTR(-EINVAL);
 }
 
 struct xprt_class xprt_rdma_bc = {

  parent reply	other threads:[~2018-10-02  0:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 18:15 [PATCH v1 0/4] NFS/RDMA server patches for v4.20 Chuck Lever
2018-10-01 18:15 ` [PATCH v1 1/4] svcrdma: Reduce max_send_sges Chuck Lever
2018-10-01 22:28   ` Sagi Grimberg
2018-10-01 18:16 ` [PATCH v1 2/4] svcrdma: Remove ->release_rqst call in bc reply handler Chuck Lever
2018-10-01 22:28   ` Sagi Grimberg
2018-10-01 18:16 ` Chuck Lever [this message]
2018-10-01 22:31   ` [PATCH v1 3/4] svcrdma: Remove try_module_get from backchannel Sagi Grimberg
2018-10-01 22:35     ` Sagi Grimberg
2018-10-01 18:16 ` [PATCH v1 4/4] svcrdma: Increase the default connection credit limit Chuck Lever
2018-10-01 22:33   ` Sagi Grimberg
2018-10-02 14:34     ` Chuck Lever
2018-10-04  1:01 ` [PATCH v1 0/4] NFS/RDMA server patches for v4.20 J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181001181606.2305.48044.stgit@klimt.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).