diff mbox series

[12/13] proc: Pass a NULL pointer to kernel_write

Message ID 20201003025534.21045-13-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Clean up kernel_read/kernel_write | expand

Commit Message

Matthew Wilcox Oct. 3, 2020, 2:55 a.m. UTC
We want to start at 0 and do not care about the updated value.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/proc/proc_sysctl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 317899222d7f..be9c46833aa5 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -1754,7 +1754,6 @@  static int process_sysctl_arg(char *param, char *val,
 	struct file *file;
 	int len;
 	int err;
-	loff_t pos = 0;
 	ssize_t wret;
 
 	if (strncmp(param, "sysctl", sizeof("sysctl") - 1) == 0) {
@@ -1812,7 +1811,7 @@  static int process_sysctl_arg(char *param, char *val,
 		goto out;
 	}
 	len = strlen(val);
-	wret = kernel_write(file, val, len, &pos);
+	wret = kernel_write(file, val, len, NULL);
 	if (wret < 0) {
 		err = wret;
 		if (err == -EINVAL)