summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-10 04:52:00 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-10 04:52:00 +0200
commit3f6c78dcebdc0904d3b614da07e9ec8d84de2532 (patch)
tree71dd11b3f29bb6341270fec2e0afe0fdf8dc96be /src/mount.c
parent82c64bf578623f0678b4de1ac08c6bd8e5d95662 (diff)
service: allow immediate stopping while starting
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mount.c b/src/mount.c
index bff956e166..30390de99d 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -806,23 +806,20 @@ static int mount_stop(Unit *u) {
assert(m);
- /* Cann't do this right now. */
- if (m->state == MOUNT_MOUNTING ||
- m->state == MOUNT_MOUNTING_DONE ||
- m->state == MOUNT_MOUNTING_SIGTERM ||
- m->state == MOUNT_MOUNTING_SIGKILL ||
- m->state == MOUNT_REMOUNTING ||
- m->state == MOUNT_REMOUNTING_SIGTERM ||
- m->state == MOUNT_REMOUNTING_SIGKILL)
- return -EAGAIN;
-
/* Already on it */
if (m->state == MOUNT_UNMOUNTING ||
m->state == MOUNT_UNMOUNTING_SIGKILL ||
m->state == MOUNT_UNMOUNTING_SIGTERM)
return 0;
- assert(m->state == MOUNT_MOUNTED);
+ assert(m->state == MOUNT_MOUNTING ||
+ m->state == MOUNT_MOUNTING_DONE ||
+ m->state == MOUNT_MOUNTED ||
+ m->state == MOUNT_MOUNTING_SIGTERM ||
+ m->state == MOUNT_MOUNTING_SIGKILL ||
+ m->state == MOUNT_REMOUNTING ||
+ m->state == MOUNT_REMOUNTING_SIGTERM ||
+ m->state == MOUNT_REMOUNTING_SIGKILL);
mount_enter_unmounting(m, true);
return 0;