[Devel] [PATCH RHEL7 COMMIT] proc: drop proc_dentry_of_dead_task

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 5 03:44:30 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.9
------>
commit bf0594d6b44f6e53267b9a4aa7b2b712fdec11c3
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Fri Jun 5 14:44:30 2015 +0400

    proc: drop proc_dentry_of_dead_task
    
    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 caa530c..9555e58 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>
@@ -3388,35 +3387,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 3ad9873..c35971a 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)
 {
 }



More information about the Devel mailing list