summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
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-11 07:29:01 -0700
commit943a38e9f8beaaaa7fe741398c573fc458037723 (patch)
tree18e6e66b5be570aadf4ca9ed71cb14f39b032aa7 /libglusterfsclient
parent4a31c02a568464cc4030b20cefe71ccb007b45bf (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')
-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 89c5718..f5465c8 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;
}