diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 483fd6dd8f4ce9b132205eaff1456a7b55b90398..2356cffb33eb0bbf8d5cb94349189137e8ac8f6e 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -352,6 +352,7 @@ virStorageBackendFileSystemMount(virStoragePoolObjPtr pool) { pool->def->source.format == VIR_STORAGE_POOL_NETFS_GLUSTERFS); virCommandPtr cmd = NULL; int ret = -1; + int rc; if (pool->def->type == VIR_STORAGE_POOL_NETFS) { if (pool->def->source.nhost != 1) { @@ -378,10 +379,12 @@ virStorageBackendFileSystemMount(virStoragePoolObjPtr pool) { } /* Short-circuit if already mounted */ - if ((ret = virStorageBackendFileSystemIsMounted(pool)) != 0) { - virReportError(VIR_ERR_OPERATION_INVALID, - _("Target '%s' is already mounted"), - pool->def->target.path); + if ((rc = virStorageBackendFileSystemIsMounted(pool)) != 0) { + if (rc == 1) { + virReportError(VIR_ERR_OPERATION_INVALID, + _("Target '%s' is already mounted"), + pool->def->target.path); + } return -1; }