Commit 1dd704b6 authored by David Howells's avatar David Howells Committed by Al Viro

proc: Uninline pid_delete_dentry()

Uninline pid_delete_dentry() as it's only used by three function pointers.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 271a15ea
...@@ -1621,6 +1621,15 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags) ...@@ -1621,6 +1621,15 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
return 0; return 0;
} }
int pid_delete_dentry(const struct dentry *dentry)
{
/* Is the task we represent dead?
* If so, then don't put the dentry on the lru list,
* kill it immediately.
*/
return !proc_pid(dentry->d_inode)->tasks[PIDTYPE_PID].first;
}
const struct dentry_operations pid_dentry_operations = const struct dentry_operations pid_dentry_operations =
{ {
.d_revalidate = pid_revalidate, .d_revalidate = pid_revalidate,
......
...@@ -114,15 +114,6 @@ static inline int task_dumpable(struct task_struct *task) ...@@ -114,15 +114,6 @@ static inline int task_dumpable(struct task_struct *task)
return 0; return 0;
} }
static inline int pid_delete_dentry(const struct dentry * dentry)
{
/* Is the task we represent dead?
* If so, then don't put the dentry on the lru list,
* kill it immediately.
*/
return !proc_pid(dentry->d_inode)->tasks[PIDTYPE_PID].first;
}
static inline unsigned name_to_int(struct dentry *dentry) static inline unsigned name_to_int(struct dentry *dentry)
{ {
const char *name = dentry->d_name.name; const char *name = dentry->d_name.name;
...@@ -145,6 +136,11 @@ static inline unsigned name_to_int(struct dentry *dentry) ...@@ -145,6 +136,11 @@ static inline unsigned name_to_int(struct dentry *dentry)
return ~0U; return ~0U;
} }
/*
* base.c
*/
extern int pid_delete_dentry(const struct dentry *);
struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *ino, struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *ino,
struct dentry *dentry); struct dentry *dentry);
int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent, int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment