diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2017-01-21 06:09:08 +0100 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2017-01-27 22:05:26 +0100 |
commit | b18b6a9cef7f30e9a8b7738d5fc8d568cf660855 (patch) | |
tree | 51be9f1d6b36120182dc4e0906460ddc1e011d65 /fs/proc | |
parent | delay: Add explanation of udelay() inaccuracy (diff) | |
download | linux-b18b6a9cef7f30e9a8b7738d5fc8d568cf660855.tar.xz linux-b18b6a9cef7f30e9a8b7738d5fc8d568cf660855.zip |
timers: Omit POSIX timer stuff from task_struct when disabled
When CONFIG_POSIX_TIMERS is disabled, it is preferable to remove related
structures from struct task_struct and struct signal_struct as they
won't contain anything useful and shouldn't be relied upon by mistake.
Code still referencing those structures is also disabled here.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 8e7e61b28f31..03deeac1e835 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2179,7 +2179,7 @@ static const struct file_operations proc_map_files_operations = { .llseek = generic_file_llseek, }; -#ifdef CONFIG_CHECKPOINT_RESTORE +#if defined(CONFIG_CHECKPOINT_RESTORE) && defined(CONFIG_POSIX_TIMERS) struct timers_private { struct pid *pid; struct task_struct *task; @@ -2936,7 +2936,7 @@ static const struct pid_entry tgid_base_stuff[] = { REG("projid_map", S_IRUGO|S_IWUSR, proc_projid_map_operations), REG("setgroups", S_IRUGO|S_IWUSR, proc_setgroups_operations), #endif -#ifdef CONFIG_CHECKPOINT_RESTORE +#if defined(CONFIG_CHECKPOINT_RESTORE) && defined(CONFIG_POSIX_TIMERS) REG("timers", S_IRUGO, proc_timers_operations), #endif REG("timerslack_ns", S_IRUGO|S_IWUGO, proc_pid_set_timerslack_ns_operations), |