]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fs/proc/base.c - fix sparse errors
authorBen Dooks <ben-linux@fluff.org>
Tue, 15 Mar 2005 11:37:12 +0000 (03:37 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 15 Mar 2005 11:37:12 +0000 (03:37 -0800)
Rewrite initialiser for proc_oom_adjust_operations, and add __user
annotations to oom_adjust_{read|write}

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/proc/base.c

index 1e4b41df3ab7e1bf2095f7c1ecb93999de66d7f9..2bea13167d3ec0b6dcd454744cf4ecf8bd3d6bb9 100644 (file)
@@ -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 = {