Having information from /proc/self/mountinfo is sufficient to consider a
mount unit loaded.
When there's no mountinfo, the loading of the fragment for the mount
unit is not optional. No extra dependency links must be added when the
loading fails.
https://bugzilla.redhat.com/show_bug.cgi?id=835848
assert(u);
assert(u->load_state == UNIT_STUB);
- r = unit_load_fragment_and_dropin_optional(u);
+ if (m->from_proc_self_mountinfo)
+ r = unit_load_fragment_and_dropin_optional(u);
+ else
+ r = unit_load_fragment_and_dropin(u);
+
if (r < 0)
return r;
} else {
delete = false;
free(e);
+
+ if (u->load_state == UNIT_ERROR) {
+ u->load_state = UNIT_LOADED;
+ u->load_error = 0;
+ r = mount_add_extras(MOUNT(u));
+ if (r < 0)
+ goto fail;
+ }
}
if (!(w = strdup(what)) ||