diff options
Diffstat (limited to 'contrib/fuse-lib/mount.c')
-rw-r--r-- | contrib/fuse-lib/mount.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/fuse-lib/mount.c b/contrib/fuse-lib/mount.c index 1edde86014a..bfe28d3a26a 100644 --- a/contrib/fuse-lib/mount.c +++ b/contrib/fuse-lib/mount.c @@ -360,12 +360,17 @@ gf_fuse_mount (const char *mountpoint, char *fsname, fd); if (ret == -1) { gf_log ("glusterfs-fuse", GF_LOG_INFO, - "direct mount failed (%s) errno %d, " - "retry to mount via fusermount", + "direct mount failed (%s) errno %d", strerror (errno), errno); - ret = fuse_mount_fusermount (mountpoint, fsname, - mountflags, mnt_param, fd); + if (errno == EPERM) { + gf_log ("glusterfs-fuse", GF_LOG_INFO, + "retry to mount via fusermount"); + + ret = fuse_mount_fusermount (mountpoint, fsname, + mountflags, + mnt_param, fd); + } } if (ret == -1) |