summaryrefslogtreecommitdiffstats
path: root/xlators/nfs
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-08-27 16:11:03 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-31 01:23:29 +0000
commita654ae2442899348aae136365786dc44a9f502ca (patch)
treea94ec71285d4ef2352484c63404ce5d1d9d5941c /xlators/nfs
parent38b69225f56271503f0ac2c72c646990e8559624 (diff)
nfs-server : fix few coverity issues in mount3.c
This patch fixes 1388767 and 1389057. Change-Id: Id4ee7c3cd72e46112315f6dccb08e76788b40d27 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r--xlators/nfs/server/src/mount3.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index ad52c6b7817..85fc1d608c6 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -2717,7 +2717,7 @@ mnt3_xlchildren_to_exports (rpcsvc_t *svc, struct mount3_state *ms)
/* chain the groups together */
if (!elist->ex_groups)
elist->ex_groups = group;
- else if (!prev_group)
+ else if (!prev_group->gr_next)
prev_group->gr_next = group;
prev_group = group;
}
@@ -4069,9 +4069,14 @@ mnt3svc_init (xlator_t *nfsx)
}
mstate->stop_refresh = _gf_false; /* Allow thread to run */
- gf_thread_create (&mstate->auth_refresh_thread, NULL,
- _mnt3_auth_param_refresh_thread, mstate,
- "nfsauth");
+ ret = gf_thread_create (&mstate->auth_refresh_thread, NULL,
+ _mnt3_auth_param_refresh_thread,
+ mstate, "nfsauth");
+ if (ret) {
+ gf_msg_debug (GF_MNT, GF_LOG_DEBUG,
+ "Thread creation failed");
+ }
+
} else
gf_msg (GF_MNT, GF_LOG_INFO, 0, NFS_MSG_EXP_AUTH_DISABLED,
"Exports auth has been disabled!");
@@ -4120,8 +4125,12 @@ mnt3svc_init (xlator_t *nfsx)
}
if (nfs->mount_udp) {
- gf_thread_create (&udp_thread, NULL, mount3udp_thread, nfsx,
- "nfsudp");
+ ret = gf_thread_create (&udp_thread, NULL, mount3udp_thread,
+ nfsx, "nfsudp");
+ if (ret) {
+ gf_msg_debug (GF_MNT, GF_LOG_DEBUG,
+ "Thread creation failed");
+ }
}
return &mnt3prog;
err: