21ab4e
From 8f51cc9afa4e0c0091e492e86da36ce35c7f6525 Mon Sep 17 00:00:00 2001
21ab4e
From: Niels de Vos <ndevos@redhat.com>
21ab4e
Date: Fri, 13 Jan 2017 16:05:02 +0100
21ab4e
Subject: [PATCH 439/473] nfs/nlm: unref rpc-client after
21ab4e
 nlm4svc_send_granted()
21ab4e
21ab4e
nlm4svc_send_granted() uses the rpc_clnt by getting it from the
21ab4e
call-state structure. It is safer to unref the rpc_clnt after the
21ab4e
function is done with it.
21ab4e
21ab4e
Cherry picked from commit 52c28c0c04722a9ffaa7c39c49ffebdf0a5c75e1:
21ab4e
> Change-Id: I7cb7c4297801463d21259c58b50d7df7c57aec5e
21ab4e
> BUG: 1381970
21ab4e
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
21ab4e
> Reviewed-on: https://review.gluster.org/17187
21ab4e
> Smoke: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
21ab4e
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> Reviewed-by: soumya k <skoduri@redhat.com>
21ab4e
> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
21ab4e
21ab4e
Change-Id: I7cb7c4297801463d21259c58b50d7df7c57aec5e
21ab4e
Signed-off-by: Niels de Vos <ndevos@redhat.com>
21ab4e
Reviewed-on: https://code.engineering.redhat.com/gerrit/106031
21ab4e
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
21ab4e
---
21ab4e
 xlators/nfs/server/src/nlm4.c | 2 +-
21ab4e
 1 file changed, 1 insertion(+), 1 deletion(-)
21ab4e
21ab4e
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
21ab4e
index 3da3b2d..1675116 100644
21ab4e
--- a/xlators/nfs/server/src/nlm4.c
21ab4e
+++ b/xlators/nfs/server/src/nlm4.c
21ab4e
@@ -934,8 +934,8 @@ nlm_rpcclnt_notify (struct rpc_clnt *rpc_clnt, void *mydata,
21ab4e
                                 "rpc clnt");
21ab4e
                         goto err;
21ab4e
                 }
21ab4e
-                rpc_clnt_unref (rpc_clnt);
21ab4e
                 nlm4svc_send_granted (cs);
21ab4e
+                rpc_clnt_unref (rpc_clnt);
21ab4e
 
21ab4e
                 break;
21ab4e
 
21ab4e
-- 
21ab4e
1.8.3.1
21ab4e