diff options
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 36 |
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 { | |||
365 | static int mounts_open(struct inode *inode, struct file *file) | 365 | static 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) | |||
399 | static int mounts_release(struct inode *inode, struct file *file) | 399 | static 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 | ||
407 | static unsigned mounts_poll(struct file *file, poll_table *wait) | 407 | static 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; |