diff options
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 9be7d91cc45..544dec0c3b5 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -4678,6 +4678,7 @@ init (xlator_t *this_xl) int fsname_allocated = 0; glusterfs_ctx_t *ctx = NULL; gf_boolean_t sync_to_mount = _gf_false; + unsigned long mntflags = 0; char *mnt_args = NULL; eh_t *event = NULL; @@ -4889,8 +4890,9 @@ init (xlator_t *this_xl) goto cleanup_exit; } - gf_asprintf (&mnt_args, "%s%s%s%sallow_other,max_read=131072", - priv->read_only ? "ro," : "", + if (priv->read_only) + mntflags |= MS_RDONLY; + gf_asprintf (&mnt_args, "%s%s%sallow_other,max_read=131072", priv->acl ? "" : "default_permissions,", priv->fuse_mountopts ? priv->fuse_mountopts : "", priv->fuse_mountopts ? "," : ""); @@ -4903,7 +4905,7 @@ init (xlator_t *this_xl) goto cleanup_exit; } - priv->fd = gf_fuse_mount (priv->mount_point, fsname, mnt_args, + priv->fd = gf_fuse_mount (priv->mount_point, fsname, mntflags, mnt_args, sync_to_mount ? &ctx->mnt_pid : NULL, priv->status_pipe[1]); if (priv->fd == -1) |