]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] sparse: nfs __user annotation (client only, and not touching RPC)
authorAlexander Viro <viro@www.linux.org.uk>
Sat, 29 May 2004 04:12:25 +0000 (21:12 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 29 May 2004 04:12:25 +0000 (21:12 -0700)
fs/nfs/direct.c
fs/nfs/file.c
include/linux/nfs_fs.h

index a7a7bf48fda168d001538c6ea44edb413b75fb83..b8018d5ae14b49ab23aff7e9d6001da61d80b467 100644 (file)
@@ -536,7 +536,7 @@ out:
  * is no atomic O_APPEND write facility in the NFS protocol.
  */
 ssize_t
-nfs_file_direct_write(struct kiocb *iocb, const char *buf, size_t count, loff_t pos)
+nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t pos)
 {
        ssize_t retval = -EINVAL;
        loff_t *ppos = &iocb->ki_pos;
@@ -546,7 +546,7 @@ nfs_file_direct_write(struct kiocb *iocb, const char *buf, size_t count, loff_t
        struct address_space *mapping = file->f_mapping;
        struct inode *inode = mapping->host;
        struct iovec iov = {
-               .iov_base = (void __user *)buf,
+               .iov_base = buf,
                .iov_len = count,
        };
 
index b15bfe3f24c96807a6c5f277cb13582e843e6004..1ea93c580a03f8362a72462d642ecf376f5810f3 100644 (file)
@@ -38,9 +38,9 @@ static long nfs_file_fcntl(int fd, unsigned int cmd,
 static int nfs_file_open(struct inode *, struct file *);
 static int nfs_file_release(struct inode *, struct file *);
 static int  nfs_file_mmap(struct file *, struct vm_area_struct *);
-static ssize_t nfs_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
-static ssize_t nfs_file_read(struct kiocb *, char *, size_t, loff_t);
-static ssize_t nfs_file_write(struct kiocb *, const char *, size_t, loff_t);
+static ssize_t nfs_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void __user *);
+static ssize_t nfs_file_read(struct kiocb *, char __user *, size_t, loff_t);
+static ssize_t nfs_file_write(struct kiocb *, const char __user *, size_t, loff_t);
 static int  nfs_file_flush(struct file *);
 static int  nfs_fsync(struct file *, struct dentry *dentry, int datasync);
 
@@ -148,7 +148,7 @@ nfs_file_flush(struct file *file)
 }
 
 static ssize_t
-nfs_file_read(struct kiocb *iocb, char * buf, size_t count, loff_t pos)
+nfs_file_read(struct kiocb *iocb, char __user * buf, size_t count, loff_t pos)
 {
        struct dentry * dentry = iocb->ki_filp->f_dentry;
        struct inode * inode = dentry->d_inode;
@@ -171,7 +171,7 @@ nfs_file_read(struct kiocb *iocb, char * buf, size_t count, loff_t pos)
 
 static ssize_t
 nfs_file_sendfile(struct file *filp, loff_t *ppos, size_t count,
-               read_actor_t actor, void *target)
+               read_actor_t actor, void __user *target)
 {
        struct dentry *dentry = filp->f_dentry;
        struct inode *inode = dentry->d_inode;
@@ -267,7 +267,7 @@ struct address_space_operations nfs_file_aops = {
  * Write to a file (through the page cache).
  */
 static ssize_t
-nfs_file_write(struct kiocb *iocb, const char *buf, size_t count, loff_t pos)
+nfs_file_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t pos)
 {
        struct dentry * dentry = iocb->ki_filp->f_dentry;
        struct inode * inode = dentry->d_inode;
index 680502785dc68c7dc9970dfe77d231b2dc790f66..6246101b631dd3451096387ab889575c3eab4e98 100644 (file)
@@ -308,7 +308,7 @@ extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t,
                        unsigned long);
 extern ssize_t nfs_file_direct_read(struct kiocb *iocb, char *buf,
                        size_t count, loff_t pos);
-extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char *buf,
+extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf,
                        size_t count, loff_t pos);
 
 /*