forked from luck/tmp_suning_uos_patched
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: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e13ec939e9
commit
73e18f7c0b
|
@ -487,7 +487,7 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
|
|||
}
|
||||
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;
|
||||
const char __user *p;
|
||||
|
|
|
@ -2780,7 +2780,7 @@ extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t,
|
|||
enum kernel_read_file_id);
|
||||
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 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 *);
|
||||
|
||||
/* fs/dcache.c -- generic fs support functions */
|
||||
|
|
|
@ -516,7 +516,7 @@ static void do_acct_process(struct bsd_acct_struct *acct)
|
|||
if (file_start_write_trylock(file)) {
|
||||
/* it's been opened O_APPEND, so position is irrelevant */
|
||||
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);
|
||||
}
|
||||
out:
|
||||
|
|
Loading…
Reference in New Issue
Block a user