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:
parent
ee9e629eea
commit
8be17c9b13
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user