From ff59bcd2fe9103e3374f8b415cb12b5f21381c24 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 17 May 2002 21:58:06 -0700 Subject: [PATCH] cleanup read/write Currently sys_read/sys_pread and sys_write/sys_pwrite basically contain lots of duplication of the same checks/code. This moves all that into vfs_read/vfs_write helpers that have the same prototypes as the read/write file operations. In addition I have choosen to export these interfaces to module so people doing inkernel file reading/writing can use these instead of duplicating the checks (which is very likely to be done wrong). --- include/linux/fs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index 5534da65ff74..4b858f90c6fe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -759,6 +759,9 @@ struct inode_operations { struct seq_file; +extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *); +extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *); + /* * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called * without the big kernel lock held in all filesystems. -- cgit v1.2.3