summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 1404b148bd5..e61671829e1 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -5032,10 +5032,16 @@ fuse_graph_setup (xlator_t *this, glusterfs_graph_t *graph)
if (priv->active_subvol == graph->top)
return 0; /* This is a valid case */
- if (graph->used)
- return 0;
+ pthread_mutex_lock (&priv->sync_mutex);
+ {
+ if (graph->used) {
+ pthread_mutex_unlock (&priv->sync_mutex);
+ return 0;
+ }
- graph->used = 1;
+ graph->used = 1;
+ }
+ pthread_mutex_unlock (&priv->sync_mutex);
itable = inode_table_new (0, graph->top);
if (!itable)