]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: drop unused user_tasks_max field 14007/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 Nov 2019 19:48:42 +0000 (20:48 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Nov 2019 17:41:54 +0000 (18:41 +0100)
We would only write to the field, and take the address. All *readers* were
removed in 284149392755f086d0a714071c33aa609e61505e. (The explanation for why
the field wasn't removed back then is that the patch underwent a few iterations,
with the initial version adding translation back and forth. Later versions of
the patch simply emit a warning and ignore the old value. Apparently nobody
noticed that the value became unused.)

src/basic/cgroup-util.h
src/login/logind-core.c
src/login/logind-gperf.gperf
src/login/logind-user.c
src/login/logind.h

index 6b4d6e1006fbcf9980961c88dabdc00b68ae5c8a..a717029cbe322a80d52569c6cce655aacee25fa6 100644 (file)
@@ -129,9 +129,6 @@ static inline bool CGROUP_BLKIO_WEIGHT_IS_OK(uint64_t x) {
             (x >= CGROUP_BLKIO_WEIGHT_MIN && x <= CGROUP_BLKIO_WEIGHT_MAX);
 }
 
-/* Default resource limits */
-#define DEFAULT_USER_TASKS_MAX_PERCENTAGE       33U /* 33% of PIDs, 10813 on default settings */
-
 typedef enum CGroupUnified {
         CGROUP_UNIFIED_UNKNOWN = -1,
         CGROUP_UNIFIED_NONE = 0,        /* Both systemd and controllers on legacy */
index 4585afedc617bfa7e4fbfa23b8307c338e6f085f..e84b38096a1c50cc432497f29380b5ea8c43873b 100644 (file)
@@ -54,7 +54,6 @@ void manager_reset_config(Manager *m) {
         m->idle_action = HANDLE_IGNORE;
 
         m->runtime_dir_size = physical_memory_scale(10U, 100U); /* 10% */
-        m->user_tasks_max = system_tasks_max_scale(DEFAULT_USER_TASKS_MAX_PERCENTAGE, 100U); /* 33% */
         m->sessions_max = 8192;
         m->inhibitors_max = 8192;
 
index 8829ce7d85a219cd3258b7757bb4a34a472f0046..983795da40d598a93f8ce33aac902c77a56e4bb6 100644 (file)
@@ -41,4 +41,4 @@ Login.RuntimeDirectorySize,         config_parse_tmpfs_size,            0, offse
 Login.RemoveIPC,                    config_parse_bool,                  0, offsetof(Manager, remove_ipc)
 Login.InhibitorsMax,                config_parse_uint64,                0, offsetof(Manager, inhibitors_max)
 Login.SessionsMax,                  config_parse_uint64,                0, offsetof(Manager, sessions_max)
-Login.UserTasksMax,                 config_parse_compat_user_tasks_max, 0, offsetof(Manager, user_tasks_max)
+Login.UserTasksMax,                 config_parse_compat_user_tasks_max, 0, 0
index c3c8b1a2a57cf2fe009f576ff74b2e8607d859bf..1550431bea5c3bb2253b77e3403efc583730d773 100644 (file)
@@ -849,7 +849,6 @@ int config_parse_compat_user_tasks_max(
         assert(filename);
         assert(lvalue);
         assert(rvalue);
-        assert(data);
 
         log_syntax(unit, LOG_NOTICE, filename, line, 0,
                    "Support for option %s= has been removed.",
index 5e2dc8cb77de592dc59edf1d96de517bace79245..f0f8928ef2281e17988a8183a8bc3da7a5e64a3f 100644 (file)
@@ -119,7 +119,6 @@ struct Manager {
         sd_event_source *lid_switch_ignore_event_source;
 
         uint64_t runtime_dir_size;
-        uint64_t user_tasks_max;
         uint64_t sessions_max;
         uint64_t inhibitors_max;
 };