X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmount.c;h=2fc799a6ed58cfc0a636fd6a80c6dea9759365ba;hb=260a2be45522f03ce8d8aca38e471d7b0882ff05;hp=660af131dc6312cbaaf891a6df0b99f22da8e893;hpb=ab5c3e3ff172e7dc295d3022170ee6a3be062a3f;p=elogind.git diff --git a/src/mount.c b/src/mount.c index 660af131d..2fc799a6e 100644 --- a/src/mount.c +++ b/src/mount.c @@ -320,7 +320,10 @@ static bool needs_quota(MountParameters *p) { return false; return mount_test_option(p->options, "usrquota") || - mount_test_option(p->options, "grpquota"); + mount_test_option(p->options, "grpquota") || + mount_test_option(p->options, "quota") || + mount_test_option(p->options, "usrjquota") || + mount_test_option(p->options, "grpjquota"); } static int mount_add_fstab_links(Mount *m) { @@ -791,6 +794,7 @@ static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) { true, m->meta.manager->confirm_spawn, m->meta.cgroup_bondings, + m->meta.cgroup_attributes, &pid)) < 0) goto fail; @@ -1473,7 +1477,7 @@ static int mount_find_pri(char *options) { char *end, *pri; unsigned long r; - if (!(pri = mount_test_option(options, "pri="))) + if (!(pri = mount_test_option(options, "pri"))) return 0; pri += 4; @@ -1769,19 +1773,20 @@ static int mount_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError if (who == KILL_MAIN) { dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "Mount units have no main processes"); - return -EINVAL; + return -ESRCH; } if (m->control_pid <= 0 && who == KILL_CONTROL) { dbus_set_error(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill"); - return -ENOENT; + return -ESRCH; } - if (m->control_pid > 0) - if (kill(m->control_pid, signo) < 0) - r = -errno; + if (who == KILL_CONTROL || who == KILL_ALL) + if (m->control_pid > 0) + if (kill(m->control_pid, signo) < 0) + r = -errno; - if (mode == KILL_CONTROL_GROUP) { + if (who == KILL_ALL && mode == KILL_CONTROL_GROUP) { int q; if (!(pid_set = set_new(trivial_hash_func, trivial_compare_func))) @@ -1795,7 +1800,7 @@ static int mount_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError } if ((q = cgroup_bonding_kill_list(m->meta.cgroup_bondings, signo, false, pid_set)) < 0) - if (r != -EAGAIN && r != -ESRCH && r != -ENOENT) + if (q != -EAGAIN && q != -ESRCH && q != -ENOENT) r = q; } @@ -1834,6 +1839,10 @@ DEFINE_STRING_TABLE_LOOKUP(mount_exec_command, MountExecCommand); const UnitVTable mount_vtable = { .suffix = ".mount", + .sections = + "Unit\0" + "Mount\0" + "Install\0", .no_alias = true, .no_instances = true,