diff mbox

[3/3] fs: mark vfs_readv and vfs_writev static

Message ID 20170528094807.26801-4-hch@lst.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig May 28, 2017, 9:48 a.m. UTC
Users other than the syscalls should be using vfs_iter_read/write.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/read_write.c    | 6 ++----
 include/linux/fs.h | 4 ----
 2 files changed, 2 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/fs/read_write.c b/fs/read_write.c
index 3d76e5bff62d..4fde69b05245 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -950,7 +950,7 @@  ssize_t vfs_iter_write(struct file *file, struct iov_iter *iter, loff_t *ppos,
 }
 EXPORT_SYMBOL(vfs_iter_write);
 
-ssize_t vfs_readv(struct file *file, const struct iovec __user *vec,
+static ssize_t vfs_readv(struct file *file, const struct iovec __user *vec,
 		  unsigned long vlen, loff_t *pos, int flags)
 {
 	struct iovec iovstack[UIO_FASTIOV];
@@ -966,9 +966,8 @@  ssize_t vfs_readv(struct file *file, const struct iovec __user *vec,
 
 	return ret;
 }
-EXPORT_SYMBOL(vfs_readv);
 
-ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
+static ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
 		   unsigned long vlen, loff_t *pos, int flags)
 {
 	struct iovec iovstack[UIO_FASTIOV];
@@ -983,7 +982,6 @@  ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
 	}
 	return ret;
 }
-EXPORT_SYMBOL(vfs_writev);
 
 static ssize_t do_readv(unsigned long fd, const struct iovec __user *vec,
 			unsigned long vlen, int flags)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 17955f196ad5..ac148c5909c9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1754,10 +1754,6 @@  extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *);
 extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *);
 extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
 extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
-extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
-		unsigned long, loff_t *, int);
-extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
-		unsigned long, loff_t *, int);
 extern ssize_t vfs_copy_file_range(struct file *, loff_t , struct file *,
 				   loff_t, size_t, unsigned int);
 extern int vfs_clone_file_prep_inodes(struct inode *inode_in, loff_t pos_in,