Skip to content

Commit 9ca48e2

Browse files
tklausertorvalds
authored andcommitted
fs/fs-writeback.c: adjust dirtytime_interval_handler definition to match prototype
Commit 3292739 ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the definition of dirtytime_interval_handler to match its prototype in linux/writeback.h which fixes the following sparse error/warning: fs/fs-writeback.c:2189:50: warning: incorrect type in argument 3 (different address spaces) fs/fs-writeback.c:2189:50: expected void * fs/fs-writeback.c:2189:50: got void [noderef] __user *buffer fs/fs-writeback.c:2184:5: error: symbol 'dirtytime_interval_handler' redeclared with different type (incompatible argument 3 (different address spaces)): fs/fs-writeback.c:2184:5: int extern [addressable] [signed] [toplevel] dirtytime_interval_handler( ... ) fs/fs-writeback.c: note: in included file: ./include/linux/writeback.h:374:5: note: previously declared as: ./include/linux/writeback.h:374:5: int extern [addressable] [signed] [toplevel] dirtytime_interval_handler( ... ) Fixes: 3292739 ("sysctl: pass kernel pointers to ->proc_handler") Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Link: https://lkml.kernel.org/r/20200907093140.13434-1-tklauser@distanz.ch Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4773ef3 commit 9ca48e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/fs-writeback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ static int __init start_dirtytime_writeback(void)
21842184
__initcall(start_dirtytime_writeback);
21852185

21862186
int dirtytime_interval_handler(struct ctl_table *table, int write,
2187-
void __user *buffer, size_t *lenp, loff_t *ppos)
2187+
void *buffer, size_t *lenp, loff_t *ppos)
21882188
{
21892189
int ret;
21902190

0 commit comments

Comments
 (0)