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>
This commit is contained in:

committed by
John Stultz

parent
9f8197980d
commit
b18b6a9cef
@@ -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),
|
||||
|
Reference in New Issue
Block a user