Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37759
b: refs/heads/master
c: f6c7a1f
h: refs/heads/master
i:
  37757: 8c04c64
  37755: 63d1307
  37751: 32e0ffb
  37743: 294389a
  37727: 95a289f
  37695: 1e3cd23
  37631: 072cd78
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Oct 2, 2006
1 parent 4f99227 commit 50bf289
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20cdc894c45d2e4ab0c69e95a56b7c5ed36ae0dd
refs/heads/master: f6c7a1f34e92b0b561024ead9fa70623683025e4
12 changes: 12 additions & 0 deletions trunk/fs/proc/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/smp_lock.h>
#include <linux/mount.h>

#include "internal.h"

Expand All @@ -28,6 +29,17 @@ struct proc_dir_entry *proc_sys_root;
static int proc_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
{
if (proc_mnt) {
/* Seed the root directory with a pid so it doesn't need
* to be special in base.c. I would do this earlier but
* the only task alive when /proc is mounted the first time
* is the init_task and it doesn't have any pids.
*/
struct proc_inode *ei;
ei = PROC_I(proc_mnt->mnt_sb->s_root->d_inode);
if (!ei->pid)
ei->pid = find_get_pid(1);
}
return get_sb_single(fs_type, flags, data, proc_fill_super, mnt);
}

Expand Down

0 comments on commit 50bf289

Please sign in to comment.