summaryrefslogtreecommitdiff
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-12 01:08:50 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-01 17:29:39 -0400
commit1dd704b6175f067781807ad4da1b878357dc9755 (patch)
tree654f8494b04c0e630edfb4e9da2a50fcaa341b57 /fs/proc/base.c
parent271a15eabe094538d958dc68ccfc9c36b699247a (diff)
proc: Uninline pid_delete_dentry()
Uninline pid_delete_dentry() as it's only used by three function pointers. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 593e7c5ddb49..f2637c972160 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1621,6 +1621,15 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
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 =
{
.d_revalidate = pid_revalidate,