aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorKirill Korotaev <dev@sw.ru>2006-12-08 05:37:56 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:51 -0500
commit6b3286ed1169d74fea401367d6d4d6c6ec758a81 (patch)
treefaf5beddb797875bb92855f8606735478267959a /fs/proc/base.c
parent1ec320afdc9552c92191d5f89fcd1ebe588334ca (diff)
[PATCH] rename struct namespace to struct mnt_namespace
Rename 'struct namespace' to 'struct mnt_namespace' to avoid confusion with other namespaces being developped for the containers : pid, uts, ipc, etc. 'namespace' variables and attributes are also renamed to 'mnt_ns' Signed-off-by: Kirill Korotaev <dev@sw.ru> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index a71f1755bb57..a3b5074118a7 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -59,7 +59,7 @@
59#include <linux/string.h> 59#include <linux/string.h>
60#include <linux/seq_file.h> 60#include <linux/seq_file.h>
61#include <linux/namei.h> 61#include <linux/namei.h>
62#include <linux/namespace.h> 62#include <linux/mnt_namespace.h>
63#include <linux/mm.h> 63#include <linux/mm.h>
64#include <linux/smp_lock.h> 64#include <linux/smp_lock.h>
65#include <linux/rcupdate.h> 65#include <linux/rcupdate.h>
@@ -365,33 +365,33 @@ struct proc_mounts {
365static int mounts_open(struct inode *inode, struct file *file) 365static int mounts_open(struct inode *inode, struct file *file)
366{ 366{
367 struct task_struct *task = get_proc_task(inode); 367 struct task_struct *task = get_proc_task(inode);
368 struct namespace *namespace = NULL; 368 struct mnt_namespace *ns = NULL;
369 struct proc_mounts *p; 369 struct proc_mounts *p;
370 int ret = -EINVAL; 370 int ret = -EINVAL;
371 371
372 if (task) { 372 if (task) {
373 task_lock(task); 373 task_lock(task);
374 namespace = task->nsproxy->namespace; 374 ns = task->nsproxy->mnt_ns;
375 if (namespace) 375 if (ns)
376 get_namespace(namespace); 376 get_mnt_ns(ns);
377 task_unlock(task); 377 task_unlock(task);
378 put_task_struct(task); 378 put_task_struct(task);
379 } 379 }
380 380
381 if (namespace) { 381 if (ns) {
382 ret = -ENOMEM; 382 ret = -ENOMEM;
383 p = kmalloc(sizeof(struct proc_mounts), GFP_KERNEL); 383 p = kmalloc(sizeof(struct proc_mounts), GFP_KERNEL);
384 if (p) { 384 if (p) {
385 file->private_data = &p->m; 385 file->private_data = &p->m;
386 ret = seq_open(file, &mounts_op); 386 ret = seq_open(file, &mounts_op);
387 if (!ret) { 387 if (!ret) {
388 p->m.private = namespace; 388 p->m.private = ns;
389 p->event = namespace->event; 389 p->event = ns->event;
390 return 0; 390 return 0;
391 } 391 }
392 kfree(p); 392 kfree(p);
393 } 393 }
394 put_namespace(namespace); 394 put_mnt_ns(ns);
395 } 395 }
396 return ret; 396 return ret;
397} 397}
@@ -399,15 +399,15 @@ static int mounts_open(struct inode *inode, struct file *file)
399static int mounts_release(struct inode *inode, struct file *file) 399static int mounts_release(struct inode *inode, struct file *file)
400{ 400{
401 struct seq_file *m = file->private_data; 401 struct seq_file *m = file->private_data;
402 struct namespace *namespace = m->private; 402 struct mnt_namespace *ns = m->private;
403 put_namespace(namespace); 403 put_mnt_ns(ns);
404 return seq_release(inode, file); 404 return seq_release(inode, file);
405} 405}
406 406
407static unsigned mounts_poll(struct file *file, poll_table *wait) 407static unsigned mounts_poll(struct file *file, poll_table *wait)
408{ 408{
409 struct proc_mounts *p = file->private_data; 409 struct proc_mounts *p = file->private_data;
410 struct namespace *ns = p->m.private; 410 struct mnt_namespace *ns = p->m.private;
411 unsigned res = 0; 411 unsigned res = 0;
412 412
413 poll_wait(file, &ns->poll, wait); 413 poll_wait(file, &ns->poll, wait);
@@ -437,21 +437,21 @@ static int mountstats_open(struct inode *inode, struct file *file)
437 437
438 if (!ret) { 438 if (!ret) {
439 struct seq_file *m = file->private_data; 439 struct seq_file *m = file->private_data;
440 struct namespace *namespace = NULL; 440 struct mnt_namespace *mnt_ns = NULL;
441 struct task_struct *task = get_proc_task(inode); 441 struct task_struct *task = get_proc_task(inode);
442 442
443 if (task) { 443 if (task) {
444 task_lock(task); 444 task_lock(task);
445 if (task->nsproxy) 445 if (task->nsproxy)
446 namespace = task->nsproxy->namespace; 446 mnt_ns = task->nsproxy->mnt_ns;
447 if (namespace) 447 if (mnt_ns)
448 get_namespace(namespace); 448 get_mnt_ns(mnt_ns);
449 task_unlock(task); 449 task_unlock(task);
450 put_task_struct(task); 450 put_task_struct(task);
451 } 451 }
452 452
453 if (namespace) 453 if (mnt_ns)
454 m->private = namespace; 454 m->private = mnt_ns;
455 else { 455 else {
456 seq_release(inode, file); 456 seq_release(inode, file);
457 ret = -EINVAL; 457 ret = -EINVAL;