summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2002-05-17 21:58:06 -0700
committerChristoph Hellwig <hch@sb.bsdonline.org>2002-05-17 21:58:06 -0700
commitff59bcd2fe9103e3374f8b415cb12b5f21381c24 (patch)
tree67f188bd6cf9ff5101f6d857b87fe50c1bf02cb3 /include
parent3bfae933dbdebb085216440d1eea406dadfa3d64 (diff)
[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).
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h3
1 files changed, 3 insertions, 0 deletions
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.