Commit a832e227 authored by Ben Dooks's avatar Ben Dooks Committed by Linus Torvalds

[PATCH] fs/proc/base.c - fix sparse errors

Rewrite initialiser for proc_oom_adjust_operations, and add __user
annotations to oom_adjust_{read|write}
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2713c436
......@@ -715,7 +715,7 @@ static struct file_operations proc_mem_operations = {
.open = mem_open,
};
static ssize_t oom_adjust_read(struct file *file, char *buf,
static ssize_t oom_adjust_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task = proc_task(file->f_dentry->d_inode);
......@@ -735,7 +735,7 @@ static ssize_t oom_adjust_read(struct file *file, char *buf,
return count;
}
static ssize_t oom_adjust_write(struct file *file, const char *buf,
static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task = proc_task(file->f_dentry->d_inode);
......@@ -761,8 +761,8 @@ static ssize_t oom_adjust_write(struct file *file, const char *buf,
}
static struct file_operations proc_oom_adjust_operations = {
read: oom_adjust_read,
write: oom_adjust_write,
.read = oom_adjust_read,
.write = oom_adjust_write,
};
static struct inode_operations proc_mem_inode_operations = {
......
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