diff options
Diffstat (limited to 'fs/namespace.c')
| -rw-r--r-- | fs/namespace.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index cefa1d9939b0..dfdf51e81c1c 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
| @@ -724,20 +724,21 @@ void save_mount_options(struct super_block *sb, char *options) | |||
| 724 | } | 724 | } |
| 725 | EXPORT_SYMBOL(save_mount_options); | 725 | EXPORT_SYMBOL(save_mount_options); |
| 726 | 726 | ||
| 727 | #ifdef CONFIG_PROC_FS | ||
| 727 | /* iterator */ | 728 | /* iterator */ |
| 728 | static void *m_start(struct seq_file *m, loff_t *pos) | 729 | static void *m_start(struct seq_file *m, loff_t *pos) |
| 729 | { | 730 | { |
| 730 | struct mnt_namespace *n = m->private; | 731 | struct proc_mounts *p = m->private; |
| 731 | 732 | ||
| 732 | down_read(&namespace_sem); | 733 | down_read(&namespace_sem); |
| 733 | return seq_list_start(&n->list, *pos); | 734 | return seq_list_start(&p->ns->list, *pos); |
| 734 | } | 735 | } |
| 735 | 736 | ||
| 736 | static void *m_next(struct seq_file *m, void *v, loff_t *pos) | 737 | static void *m_next(struct seq_file *m, void *v, loff_t *pos) |
| 737 | { | 738 | { |
| 738 | struct mnt_namespace *n = m->private; | 739 | struct proc_mounts *p = m->private; |
| 739 | 740 | ||
| 740 | return seq_list_next(v, &n->list, pos); | 741 | return seq_list_next(v, &p->ns->list, pos); |
| 741 | } | 742 | } |
| 742 | 743 | ||
| 743 | static void m_stop(struct seq_file *m, void *v) | 744 | static void m_stop(struct seq_file *m, void *v) |
| @@ -794,7 +795,7 @@ static int show_vfsmnt(struct seq_file *m, void *v) | |||
| 794 | return err; | 795 | return err; |
| 795 | } | 796 | } |
| 796 | 797 | ||
| 797 | struct seq_operations mounts_op = { | 798 | const struct seq_operations mounts_op = { |
| 798 | .start = m_start, | 799 | .start = m_start, |
| 799 | .next = m_next, | 800 | .next = m_next, |
| 800 | .stop = m_stop, | 801 | .stop = m_stop, |
| @@ -833,12 +834,13 @@ static int show_vfsstat(struct seq_file *m, void *v) | |||
| 833 | return err; | 834 | return err; |
| 834 | } | 835 | } |
| 835 | 836 | ||
| 836 | struct seq_operations mountstats_op = { | 837 | const struct seq_operations mountstats_op = { |
| 837 | .start = m_start, | 838 | .start = m_start, |
| 838 | .next = m_next, | 839 | .next = m_next, |
| 839 | .stop = m_stop, | 840 | .stop = m_stop, |
| 840 | .show = show_vfsstat, | 841 | .show = show_vfsstat, |
| 841 | }; | 842 | }; |
| 843 | #endif /* CONFIG_PROC_FS */ | ||
| 842 | 844 | ||
| 843 | /** | 845 | /** |
| 844 | * may_umount_tree - check if a mount tree is busy | 846 | * may_umount_tree - check if a mount tree is busy |
