hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/fs/xfs/xfs_sysctl.c
....@@ -4,10 +4,7 @@
44 * All Rights Reserved.
55 */
66 #include "xfs.h"
7
-#include <linux/sysctl.h>
8
-#include <linux/proc_fs.h>
97 #include "xfs_error.h"
10
-#include "xfs_stats.h"
118
129 static struct ctl_table_header *xfs_table_header;
1310
....@@ -16,7 +13,7 @@
1613 xfs_stats_clear_proc_handler(
1714 struct ctl_table *ctl,
1815 int write,
19
- void __user *buffer,
16
+ void *buffer,
2017 size_t *lenp,
2118 loff_t *ppos)
2219 {
....@@ -36,7 +33,7 @@
3633 xfs_panic_mask_proc_handler(
3734 struct ctl_table *ctl,
3835 int write,
39
- void __user *buffer,
36
+ void *buffer,
4037 size_t *lenp,
4138 loff_t *ppos)
4239 {
....@@ -53,13 +50,45 @@
5350 }
5451 #endif /* CONFIG_PROC_FS */
5552
53
+STATIC int
54
+xfs_deprecate_irix_sgid_inherit_proc_handler(
55
+ struct ctl_table *ctl,
56
+ int write,
57
+ void *buffer,
58
+ size_t *lenp,
59
+ loff_t *ppos)
60
+{
61
+ if (write) {
62
+ printk_once(KERN_WARNING
63
+ "XFS: " "%s sysctl option is deprecated.\n",
64
+ ctl->procname);
65
+ }
66
+ return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
67
+}
68
+
69
+STATIC int
70
+xfs_deprecate_irix_symlink_mode_proc_handler(
71
+ struct ctl_table *ctl,
72
+ int write,
73
+ void *buffer,
74
+ size_t *lenp,
75
+ loff_t *ppos)
76
+{
77
+ if (write) {
78
+ printk_once(KERN_WARNING
79
+ "XFS: " "%s sysctl option is deprecated.\n",
80
+ ctl->procname);
81
+ }
82
+ return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
83
+}
84
+
5685 static struct ctl_table xfs_table[] = {
5786 {
5887 .procname = "irix_sgid_inherit",
5988 .data = &xfs_params.sgid_inherit.val,
6089 .maxlen = sizeof(int),
6190 .mode = 0644,
62
- .proc_handler = proc_dointvec_minmax,
91
+ .proc_handler = xfs_deprecate_irix_sgid_inherit_proc_handler,
6392 .extra1 = &xfs_params.sgid_inherit.min,
6493 .extra2 = &xfs_params.sgid_inherit.max
6594 },
....@@ -68,7 +97,7 @@
6897 .data = &xfs_params.symlink_mode.val,
6998 .maxlen = sizeof(int),
7099 .mode = 0644,
71
- .proc_handler = proc_dointvec_minmax,
100
+ .proc_handler = xfs_deprecate_irix_symlink_mode_proc_handler,
72101 .extra1 = &xfs_params.symlink_mode.min,
73102 .extra2 = &xfs_params.symlink_mode.max
74103 },