.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/fs/9p/vfs_super.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * |
---|
7 | 8 | * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com> |
---|
8 | 9 | * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov> |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or modify |
---|
11 | | - * it under the terms of the GNU General Public License version 2 |
---|
12 | | - * as published by the Free Software Foundation. |
---|
13 | | - * |
---|
14 | | - * This program is distributed in the hope that it will be useful, |
---|
15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | | - * GNU General Public License for more details. |
---|
18 | | - * |
---|
19 | | - * You should have received a copy of the GNU General Public License |
---|
20 | | - * along with this program; if not, write to: |
---|
21 | | - * Free Software Foundation |
---|
22 | | - * 51 Franklin Street, Fifth Floor |
---|
23 | | - * Boston, MA 02111-1301 USA |
---|
24 | | - * |
---|
25 | 10 | */ |
---|
26 | 11 | |
---|
27 | 12 | #include <linux/kernel.h> |
---|
.. | .. |
---|
73 | 58 | |
---|
74 | 59 | static int |
---|
75 | 60 | v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, |
---|
76 | | - int flags, void *data) |
---|
| 61 | + int flags) |
---|
77 | 62 | { |
---|
78 | 63 | int ret; |
---|
79 | 64 | |
---|
.. | .. |
---|
84 | 69 | if (v9fs_proto_dotl(v9ses)) { |
---|
85 | 70 | sb->s_op = &v9fs_super_ops_dotl; |
---|
86 | 71 | sb->s_xattr = v9fs_xattr_handlers; |
---|
87 | | - } else |
---|
| 72 | + } else { |
---|
88 | 73 | sb->s_op = &v9fs_super_ops; |
---|
| 74 | + sb->s_time_max = U32_MAX; |
---|
| 75 | + } |
---|
| 76 | + |
---|
| 77 | + sb->s_time_min = 0; |
---|
89 | 78 | |
---|
90 | 79 | ret = super_setup_bdi(sb); |
---|
91 | 80 | if (ret) |
---|
92 | 81 | return ret; |
---|
93 | 82 | |
---|
94 | | - if (v9ses->cache) |
---|
95 | | - sb->s_bdi->ra_pages = (VM_MAX_READAHEAD * 1024)/PAGE_SIZE; |
---|
| 83 | + if (!v9ses->cache) { |
---|
| 84 | + sb->s_bdi->ra_pages = 0; |
---|
| 85 | + sb->s_bdi->io_pages = 0; |
---|
| 86 | + } |
---|
96 | 87 | |
---|
97 | 88 | sb->s_flags |= SB_ACTIVE | SB_DIRSYNC; |
---|
98 | 89 | if (!v9ses->cache) |
---|
.. | .. |
---|
143 | 134 | retval = PTR_ERR(sb); |
---|
144 | 135 | goto clunk_fid; |
---|
145 | 136 | } |
---|
146 | | - retval = v9fs_fill_super(sb, v9ses, flags, data); |
---|
| 137 | + retval = v9fs_fill_super(sb, v9ses, flags); |
---|
147 | 138 | if (retval) |
---|
148 | 139 | goto release_sb; |
---|
149 | 140 | |
---|
.. | .. |
---|
269 | 260 | buf->f_bavail = rs.bavail; |
---|
270 | 261 | buf->f_files = rs.files; |
---|
271 | 262 | buf->f_ffree = rs.ffree; |
---|
272 | | - buf->f_fsid.val[0] = rs.fsid & 0xFFFFFFFFUL; |
---|
273 | | - buf->f_fsid.val[1] = (rs.fsid >> 32) & 0xFFFFFFFFUL; |
---|
| 263 | + buf->f_fsid = u64_to_fsid(rs.fsid); |
---|
274 | 264 | buf->f_namelen = rs.namelen; |
---|
275 | 265 | } |
---|
276 | 266 | if (res != -ENOSYS) |
---|
.. | .. |
---|
344 | 334 | |
---|
345 | 335 | static const struct super_operations v9fs_super_ops = { |
---|
346 | 336 | .alloc_inode = v9fs_alloc_inode, |
---|
347 | | - .destroy_inode = v9fs_destroy_inode, |
---|
| 337 | + .free_inode = v9fs_free_inode, |
---|
348 | 338 | .statfs = simple_statfs, |
---|
349 | 339 | .evict_inode = v9fs_evict_inode, |
---|
350 | 340 | .show_options = v9fs_show_options, |
---|
.. | .. |
---|
354 | 344 | |
---|
355 | 345 | static const struct super_operations v9fs_super_ops_dotl = { |
---|
356 | 346 | .alloc_inode = v9fs_alloc_inode, |
---|
357 | | - .destroy_inode = v9fs_destroy_inode, |
---|
| 347 | + .free_inode = v9fs_free_inode, |
---|
358 | 348 | .statfs = v9fs_statfs, |
---|
359 | 349 | .drop_inode = v9fs_drop_inode, |
---|
360 | 350 | .evict_inode = v9fs_evict_inode, |
---|