[systemd-commits] src/mount.c TODO
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Jan 20 16:14:05 PST 2011
TODO | 3 ---
src/mount.c | 9 +++++++++
2 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit e0fa621b8b52da4d95bf5918eb998c9166e4bc7c
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jan 21 01:13:09 2011 +0100
automount: fix segfault when shutting down
https://bugs.freedesktop.org/show_bug.cgi?id=32076
diff --git a/TODO b/TODO
index 57802a6..5957b96 100644
--- a/TODO
+++ b/TODO
@@ -9,9 +9,6 @@ Bugs:
* somehow some /etc/fstab supplied mount params are never applied to api fs
https://bugzilla.redhat.com/show_bug.cgi?id=663108
-* automount units can cause a segfault:
- https://bugs.freedesktop.org/show_bug.cgi?id=32076
-
* bind mounts with 'fsck' fail and block for a minute:
/foo /bar none bind 1 1
(requesting fsck is wrong, but why do we block for a minute
diff --git a/src/mount.c b/src/mount.c
index f978a54..aae9d98 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -98,12 +98,21 @@ static void mount_parameters_done(MountParameters *p) {
static void mount_done(Unit *u) {
Mount *m = MOUNT(u);
+ Meta *other;
assert(m);
free(m->where);
m->where = NULL;
+ /* Try to detach us from the automount unit if there is any */
+ LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_AUTOMOUNT]) {
+ Automount *a = (Automount*) other;
+
+ if (a->mount == m)
+ a->mount = NULL;
+ }
+
mount_parameters_done(&m->parameters_etc_fstab);
mount_parameters_done(&m->parameters_proc_self_mountinfo);
mount_parameters_done(&m->parameters_fragment);
More information about the systemd-commits
mailing list