Commit 73e18f7c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro

fs: make the buf argument to __kernel_write a void pointer

This matches kernel_read and kernel_write and avoids any need for casts in
the callers.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e13ec939
...@@ -487,7 +487,7 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, ...@@ -487,7 +487,7 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
} }
EXPORT_SYMBOL(__vfs_write); EXPORT_SYMBOL(__vfs_write);
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos) ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
{ {
mm_segment_t old_fs; mm_segment_t old_fs;
const char __user *p; const char __user *p;
......
...@@ -2780,7 +2780,7 @@ extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t, ...@@ -2780,7 +2780,7 @@ extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t,
enum kernel_read_file_id); enum kernel_read_file_id);
extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *); extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
extern ssize_t kernel_write(struct file *, const void *, size_t, loff_t *); extern ssize_t kernel_write(struct file *, const void *, size_t, loff_t *);
extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *); extern ssize_t __kernel_write(struct file *, const void *, size_t, loff_t *);
extern struct file * open_exec(const char *); extern struct file * open_exec(const char *);
/* fs/dcache.c -- generic fs support functions */ /* fs/dcache.c -- generic fs support functions */
......
...@@ -516,7 +516,7 @@ static void do_acct_process(struct bsd_acct_struct *acct) ...@@ -516,7 +516,7 @@ static void do_acct_process(struct bsd_acct_struct *acct)
if (file_start_write_trylock(file)) { if (file_start_write_trylock(file)) {
/* it's been opened O_APPEND, so position is irrelevant */ /* it's been opened O_APPEND, so position is irrelevant */
loff_t pos = 0; loff_t pos = 0;
__kernel_write(file, (char *)&ac, sizeof(acct_t), &pos); __kernel_write(file, &ac, sizeof(acct_t), &pos);
file_end_write(file); file_end_write(file);
} }
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment