hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/fs/9p/vfs_super.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/fs/9p/vfs_super.c
34 *
....@@ -6,22 +7,6 @@
67 *
78 * Copyright (C) 2004 by Eric Van Hensbergen <ericvh@gmail.com>
89 * 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
- *
2510 */
2611
2712 #include <linux/kernel.h>
....@@ -73,7 +58,7 @@
7358
7459 static int
7560 v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
76
- int flags, void *data)
61
+ int flags)
7762 {
7863 int ret;
7964
....@@ -84,15 +69,21 @@
8469 if (v9fs_proto_dotl(v9ses)) {
8570 sb->s_op = &v9fs_super_ops_dotl;
8671 sb->s_xattr = v9fs_xattr_handlers;
87
- } else
72
+ } else {
8873 sb->s_op = &v9fs_super_ops;
74
+ sb->s_time_max = U32_MAX;
75
+ }
76
+
77
+ sb->s_time_min = 0;
8978
9079 ret = super_setup_bdi(sb);
9180 if (ret)
9281 return ret;
9382
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
+ }
9687
9788 sb->s_flags |= SB_ACTIVE | SB_DIRSYNC;
9889 if (!v9ses->cache)
....@@ -143,7 +134,7 @@
143134 retval = PTR_ERR(sb);
144135 goto clunk_fid;
145136 }
146
- retval = v9fs_fill_super(sb, v9ses, flags, data);
137
+ retval = v9fs_fill_super(sb, v9ses, flags);
147138 if (retval)
148139 goto release_sb;
149140
....@@ -269,8 +260,7 @@
269260 buf->f_bavail = rs.bavail;
270261 buf->f_files = rs.files;
271262 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);
274264 buf->f_namelen = rs.namelen;
275265 }
276266 if (res != -ENOSYS)
....@@ -344,7 +334,7 @@
344334
345335 static const struct super_operations v9fs_super_ops = {
346336 .alloc_inode = v9fs_alloc_inode,
347
- .destroy_inode = v9fs_destroy_inode,
337
+ .free_inode = v9fs_free_inode,
348338 .statfs = simple_statfs,
349339 .evict_inode = v9fs_evict_inode,
350340 .show_options = v9fs_show_options,
....@@ -354,7 +344,7 @@
354344
355345 static const struct super_operations v9fs_super_ops_dotl = {
356346 .alloc_inode = v9fs_alloc_inode,
357
- .destroy_inode = v9fs_destroy_inode,
347
+ .free_inode = v9fs_free_inode,
358348 .statfs = v9fs_statfs,
359349 .drop_inode = v9fs_drop_inode,
360350 .evict_inode = v9fs_evict_inode,