Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73681
b: refs/heads/master
c: e1a1c99
h: refs/heads/master
i:
  73679: b7277d6
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Nov 15, 2007
1 parent fcb7c21 commit cb72629
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 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: 7105458563213b6f6fb523065474cfe1d6c22a67
refs/heads/master: e1a1c997afe907e6ec4799e4be0f38cffd8b418c
39 changes: 22 additions & 17 deletions trunk/fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,28 +561,33 @@ static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp
static void proc_kill_inodes(struct proc_dir_entry *de)
{
struct list_head *p;
struct super_block *sb = proc_mnt->mnt_sb;
struct super_block *sb;

/*
* Actually it's a partial revoke().
*/
file_list_lock();
list_for_each(p, &sb->s_files) {
struct file * filp = list_entry(p, struct file, f_u.fu_list);
struct dentry * dentry = filp->f_path.dentry;
struct inode * inode;
const struct file_operations *fops;

if (dentry->d_op != &proc_dentry_operations)
continue;
inode = dentry->d_inode;
if (PDE(inode) != de)
continue;
fops = filp->f_op;
filp->f_op = NULL;
fops_put(fops);
spin_lock(&sb_lock);
list_for_each_entry(sb, &proc_fs_type.fs_supers, s_instances) {
file_list_lock();
list_for_each(p, &sb->s_files) {
struct file *filp = list_entry(p, struct file,
f_u.fu_list);
struct dentry *dentry = filp->f_path.dentry;
struct inode *inode;
const struct file_operations *fops;

if (dentry->d_op != &proc_dentry_operations)
continue;
inode = dentry->d_inode;
if (PDE(inode) != de)
continue;
fops = filp->f_op;
filp->f_op = NULL;
fops_put(fops);
}
file_list_unlock();
}
file_list_unlock();
spin_unlock(&sb_lock);
}

static struct proc_dir_entry *proc_create(struct proc_dir_entry **parent,
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ static inline int proc_fd(struct inode *inode)
{
return PROC_I(inode)->fd;
}

extern struct file_system_type proc_fs_type;
2 changes: 1 addition & 1 deletion trunk/fs/proc/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static void proc_kill_sb(struct super_block *sb)
put_pid_ns(ns);
}

static struct file_system_type proc_fs_type = {
struct file_system_type proc_fs_type = {
.name = "proc",
.get_sb = proc_get_sb,
.kill_sb = proc_kill_sb,
Expand Down

0 comments on commit cb72629

Please sign in to comment.