Skip to contentSkip to conversation

procfs: add conditional compilation check

PATCH In review Eric Engestrom 2 participants 2 messages Feb 29, 2016 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 procfs: add conditional compilation check

proc_timers_operations is only used when CONFIG_CHECKPOINT_RESTORE is enabled.

---
 fs/proc/base.c | 2 ++
 1 file changed, 2 insertions(+)
fs/proc/base.c +2 -0
index 4f764c2..28fc7a3 100644
@@ -2158,6 +2158,7 @@ static const struct file_operations proc_map_files_operations = {
 	.llseek		= default_llseek,
 };
 
+#ifdef CONFIG_CHECKPOINT_RESTORE
 struct timers_private {
 	struct pid *pid;
 	struct task_struct *task;
@@ -2256,6 +2257,7 @@ static const struct file_operations proc_timers_operations = {
 	.llseek		= seq_lseek,
 	.release	= seq_release_private,
 };
+#endif
 
 static int proc_pident_instantiate(struct inode *dir,
 	struct dentry *dentry, struct task_struct *task, const void *ptr)
Signature · 1 line
2.7.1