summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd.c
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2019-02-04 14:17:16 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-02-19 09:28:11 +0000
commit862e6409cb6929e1eb235a9156fbf6cbc4719236 (patch)
tree9404469bd67ffac79f7a515f6c09dc7573afef43 /glusterfsd/src/glusterfsd.c
parent6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9 (diff)
glusterd: adding a comment for code readability
Adding a comment in the source code, so that anyone reading the code will understand the changes done by d4fa29 better. fixes: bz#1654270 Change-Id: I75aff4243420c434c47d69a4b310f77bf161bb29 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'glusterfsd/src/glusterfsd.c')
-rw-r--r--glusterfsd/src/glusterfsd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 9ee88b6d57b..8d3c71e8988 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -1642,6 +1642,16 @@ cleanup_and_exit(int signum)
#endif
trav = NULL;
+
+ /* previously we were releasing the cleanup mutex lock before the
+ process exit. As we are releasing the cleanup mutex lock, before
+ the process can exit some other thread which is blocked on
+ cleanup mutex lock is acquiring the cleanup mutex lock and
+ trying to acquire some resources which are already freed as a
+ part of cleanup. To avoid this, we are exiting the process without
+ releasing the cleanup mutex lock. This will not cause any lock
+ related issues as the process which acquired the lock is going down
+ */
/* NOTE: Only the least significant 8 bits i.e (signum & 255)
will be available to parent process on calling exit() */
exit(abs(signum));