diff options
| author | David S. Miller <davem@davemloft.net> | 2010-06-26 13:27:00 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-06-26 13:27:00 -0400 |
| commit | c67dda14389205f0a223c5089307495290939b3b (patch) | |
| tree | fad0bb26b28703d02a22ebdd44d94eabac4a2ade /fs/proc | |
| parent | 43bc2db47292a824152145253b1dd2847e7312a3 (diff) | |
| parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/proc')
| -rw-r--r-- | fs/proc/array.c | 4 | ||||
| -rw-r--r-- | fs/proc/base.c | 16 | ||||
| -rw-r--r-- | fs/proc/generic.c | 15 | ||||
| -rw-r--r-- | fs/proc/kcore.c | 2 | ||||
| -rw-r--r-- | fs/proc/root.c | 1 |
5 files changed, 5 insertions, 33 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 885ab5513ac5..9b58d38bc911 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
| @@ -267,7 +267,7 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p) | |||
| 267 | shpending = p->signal->shared_pending.signal; | 267 | shpending = p->signal->shared_pending.signal; |
| 268 | blocked = p->blocked; | 268 | blocked = p->blocked; |
| 269 | collect_sigign_sigcatch(p, &ignored, &caught); | 269 | collect_sigign_sigcatch(p, &ignored, &caught); |
| 270 | num_threads = atomic_read(&p->signal->count); | 270 | num_threads = get_nr_threads(p); |
| 271 | rcu_read_lock(); /* FIXME: is this correct? */ | 271 | rcu_read_lock(); /* FIXME: is this correct? */ |
| 272 | qsize = atomic_read(&__task_cred(p)->user->sigpending); | 272 | qsize = atomic_read(&__task_cred(p)->user->sigpending); |
| 273 | rcu_read_unlock(); | 273 | rcu_read_unlock(); |
| @@ -410,7 +410,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
| 410 | tty_nr = new_encode_dev(tty_devnum(sig->tty)); | 410 | tty_nr = new_encode_dev(tty_devnum(sig->tty)); |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | num_threads = atomic_read(&sig->count); | 413 | num_threads = get_nr_threads(task); |
| 414 | collect_sigign_sigcatch(task, &sigign, &sigcatch); | 414 | collect_sigign_sigcatch(task, &sigign, &sigcatch); |
| 415 | 415 | ||
| 416 | cmin_flt = sig->cmin_flt; | 416 | cmin_flt = sig->cmin_flt; |
diff --git a/fs/proc/base.c b/fs/proc/base.c index c7f9f23449dc..acb7ef80ea4f 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -166,18 +166,6 @@ static int get_fs_path(struct task_struct *task, struct path *path, bool root) | |||
| 166 | return result; | 166 | return result; |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | static int get_nr_threads(struct task_struct *tsk) | ||
| 170 | { | ||
| 171 | unsigned long flags; | ||
| 172 | int count = 0; | ||
| 173 | |||
| 174 | if (lock_task_sighand(tsk, &flags)) { | ||
| 175 | count = atomic_read(&tsk->signal->count); | ||
| 176 | unlock_task_sighand(tsk, &flags); | ||
| 177 | } | ||
| 178 | return count; | ||
| 179 | } | ||
| 180 | |||
| 181 | static int proc_cwd_link(struct inode *inode, struct path *path) | 169 | static int proc_cwd_link(struct inode *inode, struct path *path) |
| 182 | { | 170 | { |
| 183 | struct task_struct *task = get_proc_task(inode); | 171 | struct task_struct *task = get_proc_task(inode); |
| @@ -2444,7 +2432,7 @@ static struct dentry *proc_base_instantiate(struct inode *dir, | |||
| 2444 | const struct pid_entry *p = ptr; | 2432 | const struct pid_entry *p = ptr; |
| 2445 | struct inode *inode; | 2433 | struct inode *inode; |
| 2446 | struct proc_inode *ei; | 2434 | struct proc_inode *ei; |
| 2447 | struct dentry *error = ERR_PTR(-EINVAL); | 2435 | struct dentry *error; |
| 2448 | 2436 | ||
| 2449 | /* Allocate the inode */ | 2437 | /* Allocate the inode */ |
| 2450 | error = ERR_PTR(-ENOMEM); | 2438 | error = ERR_PTR(-ENOMEM); |
| @@ -2794,7 +2782,7 @@ out: | |||
| 2794 | 2782 | ||
| 2795 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) | 2783 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) |
| 2796 | { | 2784 | { |
| 2797 | struct dentry *result = ERR_PTR(-ENOENT); | 2785 | struct dentry *result; |
| 2798 | struct task_struct *task; | 2786 | struct task_struct *task; |
| 2799 | unsigned tgid; | 2787 | unsigned tgid; |
| 2800 | struct pid_namespace *ns; | 2788 | struct pid_namespace *ns; |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 43c127490606..2791907744ed 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
| @@ -343,21 +343,6 @@ static DEFINE_SPINLOCK(proc_inum_lock); /* protects the above */ | |||
| 343 | /* | 343 | /* |
| 344 | * Return an inode number between PROC_DYNAMIC_FIRST and | 344 | * Return an inode number between PROC_DYNAMIC_FIRST and |
| 345 | * 0xffffffff, or zero on failure. | 345 | * 0xffffffff, or zero on failure. |
| 346 | * | ||
| 347 | * Current inode allocations in the proc-fs (hex-numbers): | ||
| 348 | * | ||
| 349 | * 00000000 reserved | ||
| 350 | * 00000001-00000fff static entries (goners) | ||
| 351 | * 001 root-ino | ||
| 352 | * | ||
| 353 | * 00001000-00001fff unused | ||
| 354 | * 0001xxxx-7fffxxxx pid-dir entries for pid 1-7fff | ||
| 355 | * 80000000-efffffff unused | ||
| 356 | * f0000000-ffffffff dynamic entries | ||
| 357 | * | ||
| 358 | * Goal: | ||
| 359 | * Once we split the thing into several virtual filesystems, | ||
| 360 | * we will get rid of magical ranges (and this comment, BTW). | ||
| 361 | */ | 346 | */ |
| 362 | static unsigned int get_inode_number(void) | 347 | static unsigned int get_inode_number(void) |
| 363 | { | 348 | { |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index c837a77351be..6f37c391468d 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
| @@ -588,7 +588,7 @@ static struct kcore_list kcore_text; | |||
| 588 | */ | 588 | */ |
| 589 | static void __init proc_kcore_text_init(void) | 589 | static void __init proc_kcore_text_init(void) |
| 590 | { | 590 | { |
| 591 | kclist_add(&kcore_text, _stext, _end - _stext, KCORE_TEXT); | 591 | kclist_add(&kcore_text, _text, _end - _text, KCORE_TEXT); |
| 592 | } | 592 | } |
| 593 | #else | 593 | #else |
| 594 | static void __init proc_kcore_text_init(void) | 594 | static void __init proc_kcore_text_init(void) |
diff --git a/fs/proc/root.c b/fs/proc/root.c index 757c069f2a65..4258384ed22d 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
| @@ -110,7 +110,6 @@ void __init proc_root_init(void) | |||
| 110 | if (err) | 110 | if (err) |
| 111 | return; | 111 | return; |
| 112 | proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns); | 112 | proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns); |
| 113 | err = PTR_ERR(proc_mnt); | ||
| 114 | if (IS_ERR(proc_mnt)) { | 113 | if (IS_ERR(proc_mnt)) { |
| 115 | unregister_filesystem(&proc_fs_type); | 114 | unregister_filesystem(&proc_fs_type); |
| 116 | return; | 115 | return; |
