summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2013-11-14 01:29:30 +0000
committerAnand Avati <avati@redhat.com>2013-11-14 10:39:55 -0800
commit2990befa4cf9219f33b21b6c50d3e2afa4b7461b (patch)
tree9113dcfb0c016b124eb173959ddce793a5ef4f39
parent4efbff29e773a8c59605f87bc3939c9c71b9da16 (diff)
gfapi: Closed the logfile fd in glfs_fini
The logfile fd is not closed even after calling glfs_fini, hence in smb mount if connection to glusterfs volume fails at a point after the log file was opened, the fd would remain open until the process dies. This patch closes the logfile fd in glfs_fini. Change-Id: I608bfac9c6833b42750b0383ad26fd33ee378ee1 BUG: 1030228 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6263 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--api/src/glfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index e94419c..29ed47c 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -666,5 +666,8 @@ glfs_fini (struct glfs *fs)
glfs_subvol_done (fs, subvol);
+ if (ctx->log.logfile)
+ fclose (ctx->log.logfile);
+
return ret;
}