From: Lennart Poettering Date: Wed, 28 Nov 2018 13:58:18 +0000 (+0100) Subject: mount: when the kernel reports a mount to be established reset all kinds of load... X-Git-Tag: v240~112^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8064c4fda15a286fafd73ce465dc8df2309a0bd;p=thirdparty%2Fsystemd.git mount: when the kernel reports a mount to be established reset all kinds of load failures It doesn't matter what kind of precise failure we had earlier with loading the unit, let's report that it loaded successfully now, after all the kernel is an OK source for that, like any other. --- diff --git a/src/core/mount.c b/src/core/mount.c index d0352c933f9..477c2cbafae 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1533,7 +1533,9 @@ static int mount_setup_existing_unit( MOUNT(u)->from_proc_self_mountinfo = true; - if (u->load_state == UNIT_NOT_FOUND) { + if (IN_SET(u->load_state, UNIT_NOT_FOUND, UNIT_BAD_SETTING, UNIT_ERROR)) { + /* The unit was previously not found or otherwise not loaded. Now that the unit shows up in + * /proc/self/mountinfo we should reconsider it this, hence set it to UNIT_LOADED. */ u->load_state = UNIT_LOADED; u->load_error = 0;