summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-06-10 07:02:15 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-30 14:36:26 -0700
commit804714c01420102e08882e138d9d7071e17ad355 (patch)
tree038e20d50eef5521c7b41b79ab1c4e79cc013284 /libglusterfsclient/src/libglusterfsclient.c
parent693c6f47e59b14e61c2a870555755021bafdefee (diff)
libglusterfsclient: reset the vmplist and vmpentries to 0 in glusterfs_reset
- Generally glusterfs_reset is called after fork in child to empty out vmplist. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index fc995d6..89a7dff 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -1506,6 +1506,12 @@ glusterfs_umount_all (void)
void
glusterfs_reset (void)
{
+ INIT_LIST_HEAD (&vmplist.list);
+ vmplist.entries = 0;
+
+ memset (&lock, 0, sizeof (lock));
+ pthread_mutex_init (&lock, NULL);
+
first_fini = first_init = 1;
}