diff options
author | Lauri Tirkkonen <lotheac@iki.fi> | 2018-03-28 13:57:21 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-03-28 12:57:21 +0200 |
commit | 8be17c9b136c6884f38dde9e3ec519886ad4c7e0 (patch) | |
tree | 5ca7b7d72b077bacc477e39c58683e8d65bf1d72 /src/shared/machine-image.c | |
parent | ee9e629eea3e959f0833f299c870d320354af2f5 (diff) | |
download | systemd-8be17c9b136c6884f38dde9e3ec519886ad4c7e0.tar.gz |
nspawn: do not insist on locking read-only container on readonly fs (#8589)
Diffstat (limited to 'src/shared/machine-image.c')
-rw-r--r-- | src/shared/machine-image.c | 9 |
1 files changed, 7 insertions, 2 deletions
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) { |