| .. | .. |
|---|
| 4 | 4 | * All Rights Reserved. |
|---|
| 5 | 5 | */ |
|---|
| 6 | 6 | #include "xfs.h" |
|---|
| 7 | | -#include <linux/sysctl.h> |
|---|
| 8 | | -#include <linux/proc_fs.h> |
|---|
| 9 | 7 | #include "xfs_error.h" |
|---|
| 10 | | -#include "xfs_stats.h" |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | static struct ctl_table_header *xfs_table_header; |
|---|
| 13 | 10 | |
|---|
| .. | .. |
|---|
| 16 | 13 | xfs_stats_clear_proc_handler( |
|---|
| 17 | 14 | struct ctl_table *ctl, |
|---|
| 18 | 15 | int write, |
|---|
| 19 | | - void __user *buffer, |
|---|
| 16 | + void *buffer, |
|---|
| 20 | 17 | size_t *lenp, |
|---|
| 21 | 18 | loff_t *ppos) |
|---|
| 22 | 19 | { |
|---|
| .. | .. |
|---|
| 36 | 33 | xfs_panic_mask_proc_handler( |
|---|
| 37 | 34 | struct ctl_table *ctl, |
|---|
| 38 | 35 | int write, |
|---|
| 39 | | - void __user *buffer, |
|---|
| 36 | + void *buffer, |
|---|
| 40 | 37 | size_t *lenp, |
|---|
| 41 | 38 | loff_t *ppos) |
|---|
| 42 | 39 | { |
|---|
| .. | .. |
|---|
| 53 | 50 | } |
|---|
| 54 | 51 | #endif /* CONFIG_PROC_FS */ |
|---|
| 55 | 52 | |
|---|
| 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 | + |
|---|
| 56 | 85 | static struct ctl_table xfs_table[] = { |
|---|
| 57 | 86 | { |
|---|
| 58 | 87 | .procname = "irix_sgid_inherit", |
|---|
| 59 | 88 | .data = &xfs_params.sgid_inherit.val, |
|---|
| 60 | 89 | .maxlen = sizeof(int), |
|---|
| 61 | 90 | .mode = 0644, |
|---|
| 62 | | - .proc_handler = proc_dointvec_minmax, |
|---|
| 91 | + .proc_handler = xfs_deprecate_irix_sgid_inherit_proc_handler, |
|---|
| 63 | 92 | .extra1 = &xfs_params.sgid_inherit.min, |
|---|
| 64 | 93 | .extra2 = &xfs_params.sgid_inherit.max |
|---|
| 65 | 94 | }, |
|---|
| .. | .. |
|---|
| 68 | 97 | .data = &xfs_params.symlink_mode.val, |
|---|
| 69 | 98 | .maxlen = sizeof(int), |
|---|
| 70 | 99 | .mode = 0644, |
|---|
| 71 | | - .proc_handler = proc_dointvec_minmax, |
|---|
| 100 | + .proc_handler = xfs_deprecate_irix_symlink_mode_proc_handler, |
|---|
| 72 | 101 | .extra1 = &xfs_params.symlink_mode.min, |
|---|
| 73 | 102 | .extra2 = &xfs_params.symlink_mode.max |
|---|
| 74 | 103 | }, |
|---|