Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370114
b: refs/heads/master
c: 1dd704b
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Al Viro committed May 1, 2013
1 parent c9ef6d5 commit 991bf71
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 271a15eabe094538d958dc68ccfc9c36b699247a
refs/heads/master: 1dd704b6175f067781807ad4da1b878357dc9755
9 changes: 9 additions & 0 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 5 additions & 9 deletions trunk/fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@ static inline int task_dumpable(struct task_struct *task)
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)
{
const char *name = dentry->d_name.name;
Expand All @@ -145,6 +136,11 @@ static inline unsigned name_to_int(struct dentry *dentry)
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 *dentry);
int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent,
Expand Down

0 comments on commit 991bf71

Please sign in to comment.