diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c index 3a1d7de01f..faa2eb0343 100644 --- a/src/shared/machine-image.c +++ b/src/shared/machine-image.c @@ -877,8 +877,13 @@ int image_path_lock(const char *path, int operation, LockFile *global, LockFile * block devices are device local anyway. */ if (!path_startswith(path, "/dev")) { r = make_lock_file_for(path, operation, &t); - if (r < 0) - return r; + if (r < 0) { + if ((operation & LOCK_SH) && r == -EROFS) + log_debug_errno(r, "Failed to create shared " + "lock for %s: %m", path); + else + return r; + } } if (p) {