summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nlmcbk_svc.c
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2020-09-22 17:21:26 +0530
committerMohit Agrawal <moagrawa@redhat.com>2020-09-23 13:40:51 +0530
commit168142748d4f676071d9253bb536aec734a4a0da (patch)
tree3ceb665a98962fa0e7a8c273824afda9a62f3764 /xlators/nfs/server/src/nlmcbk_svc.c
parenteedddaa7ec13f951180ff448c62ffb413913bbd7 (diff)
nfs: test case bugs_nfs_bug-1116503.t is crashed
test case is crashed because GF_ASSERT is failing in gf_mem_set_acct_info function due to access global xlator instead of accessing nfs xlator.To avoid the crash pass nfsx at the time of calling nsm_thread to set the THIS. Fixes: #1506 Change-Id: Ifd8afcdf39578aa44332d1b79744a4e9910fe7c6 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/nlmcbk_svc.c')
-rw-r--r--xlators/nfs/server/src/nlmcbk_svc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nlmcbk_svc.c b/xlators/nfs/server/src/nlmcbk_svc.c
index d18b86ce8db..eaa7b916190 100644
--- a/xlators/nfs/server/src/nlmcbk_svc.c
+++ b/xlators/nfs/server/src/nlmcbk_svc.c
@@ -84,9 +84,14 @@ nlmcbk_program_0(struct svc_req *rqstp, register SVCXPRT *transp)
void *
nsm_thread(void *argv)
{
+ xlator_t *nfsx = argv;
register SVCXPRT *transp;
int ret = 0;
+ GF_ASSERT(nfsx);
+
+ THIS = nfsx;
+
ret = pmap_unset(NLMCBK_PROGRAM, NLMCBK_V1);
if (ret == 0) {
gf_msg(GF_NLM, GF_LOG_ERROR, 0, NFS_MSG_PMAP_UNSET_FAIL,