summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/glfs-mgmt.c')
-rw-r--r--api/src/glfs-mgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index afb351d..7f62fa2 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -207,6 +207,8 @@ glusterfs_oldvolfile_update (struct glfs *fs, char *volfile, ssize_t size)
{
int ret = -1;
+ pthread_mutex_lock (&fs->mutex);
+
fs->oldvollen = size;
if (!fs->oldvolfile) {
fs->oldvolfile = GF_CALLOC (1, size+1, glfs_mt_volfile_t);
@@ -222,6 +224,8 @@ glusterfs_oldvolfile_update (struct glfs *fs, char *volfile, ssize_t size)
ret = 0;
}
+ pthread_mutex_unlock (&fs->mutex);
+
return ret;
}