[Devel] [PATCH rh7] proc: drop proc_dentry_of_dead_task

Vladimir Davydov vdavydov at parallels.com
Thu Jun 4 00:56:22 PDT 2015


This function was ported from RH6, where it is used by in-kernel CPT.
Now it is not needed. Also drop a duplicate include of linux/module.h

Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 fs/proc/base.c          | 33 ---------------------------------
 include/linux/proc_fs.h |  5 -----
 2 files changed, 38 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index c8463014f94c..360169a1b648 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -49,7 +49,6 @@
 
 #include <asm/uaccess.h>
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/time.h>
 #include <linux/proc_fs.h>
@@ -3386,35 +3385,3 @@ static const struct file_operations proc_task_operations = {
 	.readdir	= proc_task_readdir,
 	.llseek		= default_llseek,
 };
-
-/* Check whether dentry belongs to a task that already died */
-int proc_dentry_of_dead_task(struct dentry *dentry)
-{
-	if (dentry->d_inode->i_fop == &dummy_proc_pid_file_operations)
-		return 1;
-
-	return (dentry->d_op == &pid_dentry_operations &&
-		 proc_pid(dentry->d_inode)->tasks[PIDTYPE_PID].first == NULL);
-}
-EXPORT_SYMBOL(proc_dentry_of_dead_task);
-
-/* Place it here to avoid use vzrst module count */
-static ssize_t dummy_proc_pid_read(struct file * file, char __user * buf,
-				 size_t count, loff_t *ppos)
-{
-	return -ESRCH;
-}
-
-static ssize_t dummy_proc_pid_write(struct file * file, const char * buf,
-				  size_t count, loff_t *ppos)
-{
-	return -ESRCH;
-}
-
-struct file_operations dummy_proc_pid_file_operations = {
-	.read		= dummy_proc_pid_read,
-	.write		= dummy_proc_pid_write,
-};
-
-EXPORT_SYMBOL(dummy_proc_pid_file_operations);
-
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 3ad987328bcb..c35971a928b3 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -34,9 +34,6 @@ struct proc_dir_entry {
 extern void proc_root_init(void);
 extern void proc_flush_task(struct task_struct *);
 
-extern int proc_dentry_of_dead_task(struct dentry *dentry);
-extern struct file_operations dummy_proc_pid_file_operations;
-
 extern struct proc_dir_entry *proc_symlink_mode(const char *name, umode_t mode,
 			struct proc_dir_entry *parent, const char *dest);
 static inline struct proc_dir_entry *proc_symlink(const char *name,
@@ -75,8 +72,6 @@ extern int remove_proc_subtree(const char *, struct proc_dir_entry *);
 
 #else /* CONFIG_PROC_FS */
 
-static inline int proc_dentry_of_dead_task(struct dentry *dentry) { return 0; }
-
 static inline void proc_flush_task(struct task_struct *task)
 {
 }
-- 
2.1.4




More information about the Devel mailing list