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