diff options
| author | Lennart Poettering <lennart@poettering.net> | 2019-03-21 12:41:02 +0100 |
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2019-03-21 12:41:02 +0100 |
| commit | 2c9b7a7e625609246431ff1620727cd19e424401 (patch) | |
| tree | 38a8590023ae2e17f4e94b5c5330edabfb5cfba6 /src/nspawn/nspawn-mount.c | |
| parent | 74b6ce90a0f2c2c0f824fc7e89f5433758d44914 (diff) | |
| download | systemd-2c9b7a7e625609246431ff1620727cd19e424401.tar.gz | |
mount: when we fail to establish an inaccessible mount gracefully, undo the mount
Diffstat (limited to 'src/nspawn/nspawn-mount.c')
| -rw-r--r-- | src/nspawn/nspawn-mount.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index cf093cd0a2..a3447d948a 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -847,8 +847,10 @@ static int mount_inaccessible(const char *dest, CustomMount *m) { return m->graceful ? 0 : r; r = mount_verbose(m->graceful ? LOG_DEBUG : LOG_ERR, NULL, where, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, NULL); - if (r < 0) + if (r < 0) { + umount_verbose(where); return m->graceful ? 0 : r; + } return 0; } |
