From: Lennart Poettering Date: Thu, 21 Mar 2019 11:41:02 +0000 (+0100) Subject: mount: when we fail to establish an inaccessible mount gracefully, undo the mount X-Git-Tag: v242-rc1~97^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c9b7a7e625609246431ff1620727cd19e424401;p=thirdparty%2Fsystemd.git mount: when we fail to establish an inaccessible mount gracefully, undo the mount --- diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index cf093cd0a29..a3447d948a0 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; }