.. | .. |
---|
37 | 37 | return res; |
---|
38 | 38 | } |
---|
39 | 39 | |
---|
40 | | -struct proc_fs_info { |
---|
| 40 | +struct proc_fs_opts { |
---|
41 | 41 | int flag; |
---|
42 | 42 | const char *str; |
---|
43 | 43 | }; |
---|
44 | 44 | |
---|
45 | 45 | static int show_sb_opts(struct seq_file *m, struct super_block *sb) |
---|
46 | 46 | { |
---|
47 | | - static const struct proc_fs_info fs_info[] = { |
---|
| 47 | + static const struct proc_fs_opts fs_opts[] = { |
---|
48 | 48 | { SB_SYNCHRONOUS, ",sync" }, |
---|
49 | 49 | { SB_DIRSYNC, ",dirsync" }, |
---|
50 | 50 | { SB_MANDLOCK, ",mand" }, |
---|
51 | 51 | { SB_LAZYTIME, ",lazytime" }, |
---|
52 | 52 | { 0, NULL } |
---|
53 | 53 | }; |
---|
54 | | - const struct proc_fs_info *fs_infop; |
---|
| 54 | + const struct proc_fs_opts *fs_infop; |
---|
55 | 55 | |
---|
56 | | - for (fs_infop = fs_info; fs_infop->flag; fs_infop++) { |
---|
| 56 | + for (fs_infop = fs_opts; fs_infop->flag; fs_infop++) { |
---|
57 | 57 | if (sb->s_flags & fs_infop->flag) |
---|
58 | 58 | seq_puts(m, fs_infop->str); |
---|
59 | 59 | } |
---|
.. | .. |
---|
63 | 63 | |
---|
64 | 64 | static void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt) |
---|
65 | 65 | { |
---|
66 | | - static const struct proc_fs_info mnt_info[] = { |
---|
| 66 | + static const struct proc_fs_opts mnt_opts[] = { |
---|
67 | 67 | { MNT_NOSUID, ",nosuid" }, |
---|
68 | 68 | { MNT_NODEV, ",nodev" }, |
---|
69 | 69 | { MNT_NOEXEC, ",noexec" }, |
---|
70 | 70 | { MNT_NOATIME, ",noatime" }, |
---|
71 | 71 | { MNT_NODIRATIME, ",nodiratime" }, |
---|
72 | 72 | { MNT_RELATIME, ",relatime" }, |
---|
| 73 | + { MNT_NOSYMFOLLOW, ",nosymfollow" }, |
---|
73 | 74 | { 0, NULL } |
---|
74 | 75 | }; |
---|
75 | | - const struct proc_fs_info *fs_infop; |
---|
| 76 | + const struct proc_fs_opts *fs_infop; |
---|
76 | 77 | |
---|
77 | | - for (fs_infop = mnt_info; fs_infop->flag; fs_infop++) { |
---|
| 78 | + for (fs_infop = mnt_opts; fs_infop->flag; fs_infop++) { |
---|
78 | 79 | if (mnt->mnt_flags & fs_infop->flag) |
---|
79 | 80 | seq_puts(m, fs_infop->str); |
---|
80 | 81 | } |
---|
.. | .. |
---|
88 | 89 | static void show_type(struct seq_file *m, struct super_block *sb) |
---|
89 | 90 | { |
---|
90 | 91 | mangle(m, sb->s_type->name); |
---|
91 | | - if (sb->s_subtype && sb->s_subtype[0]) { |
---|
| 92 | + if (sb->s_subtype) { |
---|
92 | 93 | seq_putc(m, '.'); |
---|
93 | 94 | mangle(m, sb->s_subtype); |
---|
94 | 95 | } |
---|
.. | .. |
---|
121 | 122 | if (err) |
---|
122 | 123 | goto out; |
---|
123 | 124 | show_mnt_opts(m, mnt); |
---|
124 | | - if (sb->s_op->show_options2) |
---|
125 | | - err = sb->s_op->show_options2(mnt, m, mnt_path.dentry); |
---|
126 | | - else if (sb->s_op->show_options) |
---|
| 125 | + if (sb->s_op->show_options) |
---|
127 | 126 | err = sb->s_op->show_options(m, mnt_path.dentry); |
---|
128 | 127 | seq_puts(m, " 0 0\n"); |
---|
129 | 128 | out: |
---|
.. | .. |
---|
185 | 184 | err = show_sb_opts(m, sb); |
---|
186 | 185 | if (err) |
---|
187 | 186 | goto out; |
---|
188 | | - if (sb->s_op->show_options2) { |
---|
189 | | - err = sb->s_op->show_options2(mnt, m, mnt->mnt_root); |
---|
190 | | - } else if (sb->s_op->show_options) |
---|
| 187 | + if (sb->s_op->show_options) |
---|
191 | 188 | err = sb->s_op->show_options(m, mnt->mnt_root); |
---|
192 | 189 | seq_putc(m, '\n'); |
---|
193 | 190 | out: |
---|
.. | .. |
---|
283 | 280 | p->ns = ns; |
---|
284 | 281 | p->root = root; |
---|
285 | 282 | p->show = show; |
---|
286 | | - p->cached_event = ~0ULL; |
---|
| 283 | + INIT_LIST_HEAD(&p->cursor.mnt_list); |
---|
| 284 | + p->cursor.mnt.mnt_flags = MNT_CURSOR; |
---|
287 | 285 | |
---|
288 | 286 | return 0; |
---|
289 | 287 | |
---|
.. | .. |
---|
300 | 298 | struct seq_file *m = file->private_data; |
---|
301 | 299 | struct proc_mounts *p = m->private; |
---|
302 | 300 | path_put(&p->root); |
---|
| 301 | + mnt_cursor_del(p->ns, &p->cursor); |
---|
303 | 302 | put_mnt_ns(p->ns); |
---|
304 | 303 | return seq_release_private(inode, file); |
---|
305 | 304 | } |
---|
.. | .. |
---|
321 | 320 | |
---|
322 | 321 | const struct file_operations proc_mounts_operations = { |
---|
323 | 322 | .open = mounts_open, |
---|
324 | | - .read = seq_read, |
---|
| 323 | + .read_iter = seq_read_iter, |
---|
| 324 | + .splice_read = generic_file_splice_read, |
---|
325 | 325 | .llseek = seq_lseek, |
---|
326 | 326 | .release = mounts_release, |
---|
327 | 327 | .poll = mounts_poll, |
---|
.. | .. |
---|
329 | 329 | |
---|
330 | 330 | const struct file_operations proc_mountinfo_operations = { |
---|
331 | 331 | .open = mountinfo_open, |
---|
332 | | - .read = seq_read, |
---|
| 332 | + .read_iter = seq_read_iter, |
---|
| 333 | + .splice_read = generic_file_splice_read, |
---|
333 | 334 | .llseek = seq_lseek, |
---|
334 | 335 | .release = mounts_release, |
---|
335 | 336 | .poll = mounts_poll, |
---|
.. | .. |
---|
337 | 338 | |
---|
338 | 339 | const struct file_operations proc_mountstats_operations = { |
---|
339 | 340 | .open = mountstats_open, |
---|
340 | | - .read = seq_read, |
---|
| 341 | + .read_iter = seq_read_iter, |
---|
| 342 | + .splice_read = generic_file_splice_read, |
---|
341 | 343 | .llseek = seq_lseek, |
---|
342 | 344 | .release = mounts_release, |
---|
343 | 345 | }; |
---|