1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-14 19:24:13 +03:00

nspawn: do not insist on locking read-only container on readonly fs (#8589)

This commit is contained in:
Lauri Tirkkonen 2018-03-28 13:57:21 +03:00 committed by Lennart Poettering
parent ee9e629eea
commit 8be17c9b13

View File

@ -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) {