diff options
author | Raghavendra G <raghavendra@zresearch.com> | 2009-06-10 07:02:15 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-06-30 14:36:26 -0700 |
commit | 804714c01420102e08882e138d9d7071e17ad355 (patch) | |
tree | 038e20d50eef5521c7b41b79ab1c4e79cc013284 | |
parent | 693c6f47e59b14e61c2a870555755021bafdefee (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>
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index fc995d65b..89a7dff8a 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; } |