summaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorJoel Granados <joel.granados@kernel.org>2025-10-16 11:04:23 +0200
committerJoel Granados <joel.granados@kernel.org>2025-11-27 15:45:38 +0100
commit564195c1a33c8fc631cd3d306e350b0e3d3e9555 (patch)
tree504d8e8e033d60729c5a1897a6a36cc1b15e039c /kernel/sysctl.c
parent30baaeb685bce0b7dfd3c5a55f22b1076c21f7b2 (diff)
sysctl: Wrap do_proc_douintvec with the public function proc_douintvec_conv
Make do_proc_douintvec static and export proc_douintvec_conv wrapper function for external use. This is to keep with the design in sysctl.c. Update fs/pipe.c to use the new public API. Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index d09c6602a115..2cd767b9680e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -535,10 +535,11 @@ out:
return err;
}
-int do_proc_douintvec(const struct ctl_table *table, int dir, void *buffer,
- size_t *lenp, loff_t *ppos,
- int (*conv)(unsigned long *u_ptr, unsigned int *k_ptr,
- int dir, const struct ctl_table *table))
+static int do_proc_douintvec(const struct ctl_table *table, int dir,
+ void *buffer, size_t *lenp, loff_t *ppos,
+ int (*conv)(unsigned long *u_ptr,
+ unsigned int *k_ptr, int dir,
+ const struct ctl_table *table))
{
unsigned int vleft;
@@ -567,6 +568,15 @@ int do_proc_douintvec(const struct ctl_table *table, int dir, void *buffer,
return do_proc_douintvec_r(table, buffer, lenp, ppos, conv);
}
+int proc_douintvec_conv(const struct ctl_table *table, int dir, void *buffer,
+ size_t *lenp, loff_t *ppos,
+ int (*conv)(unsigned long *u_ptr, unsigned int *k_ptr,
+ int dir, const struct ctl_table *table))
+{
+ return do_proc_douintvec(table, dir, buffer, lenp, ppos, conv);
+}
+
+
/**
* proc_dobool - read/write a bool
* @table: the sysctl table