summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/nfs/server/src/mount3.c2
-rw-r--r--xlators/nfs/server/src/mount3udp_svc.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index cab6184f636..c4884e04fc0 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -1922,7 +1922,7 @@ mnt3svc_init (xlator_t *nfsx)
}
if (nfs->mount_udp) {
- pthread_create (&udp_thread, NULL, mount3udp_thread, NULL);
+ pthread_create (&udp_thread, NULL, mount3udp_thread, nfsx);
}
return &mnt3prog;
err:
diff --git a/xlators/nfs/server/src/mount3udp_svc.c b/xlators/nfs/server/src/mount3udp_svc.c
index fb59e282c8e..e49d50e9999 100644
--- a/xlators/nfs/server/src/mount3udp_svc.c
+++ b/xlators/nfs/server/src/mount3udp_svc.c
@@ -170,8 +170,17 @@ mountudp_program_3(struct svc_req *rqstp, register SVCXPRT *transp)
void *
mount3udp_thread (void *argv)
{
+ xlator_t *nfsx = NULL;
register SVCXPRT *transp = NULL;
+ GF_ASSERT (nfsx);
+
+ if (glusterfs_this_set(nfsx)) {
+ gf_log (GF_MNT, GF_LOG_ERROR, "failed to set xlator, "
+ "nfs.mount-udp will not work");
+ return NULL;
+ }
+
transp = svcudp_create(RPC_ANYSOCK);
if (transp == NULL) {
gf_log (GF_MNT, GF_LOG_ERROR, "svcudp_create error");