diff options
author | Carsten Otte <cotte@de.ibm.com> | 2005-06-24 01:05:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:06:41 -0400 |
commit | eb6fe0c388e43b02e261f0fdee60e42f6298d7f7 (patch) | |
tree | 3924bfbbbb10afc19f3bcd4963af14121f2c0553 /include | |
parent | 6d79125bba55ee82701f1c7d4ebbc1aa20ecbe4e (diff) |
[PATCH] xip: reduce code duplication
This patch reworks filemap_xip.c with the goal to reduce code duplication
from mm/filemap.c. It applies agains 2.6.12-rc6-mm1. Instead of
implementing the aio functions, this one implements the synchronous
read/write functions only. For readv and writev, the generic fallback is
used. For aio, we rely on the application doing the fallback. Since our
"synchronous" function does memcpy immediately anyway, there is no
performance difference between using the fallbacks or implementing each
operation.
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7e0501895f3..3ae8e37bdfc 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1500,18 +1500,14 @@ extern int generic_file_open(struct inode * inode, struct file * filp); | |||
1500 | extern int nonseekable_open(struct inode * inode, struct file * filp); | 1500 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
1501 | 1501 | ||
1502 | #ifdef CONFIG_FS_XIP | 1502 | #ifdef CONFIG_FS_XIP |
1503 | extern ssize_t xip_file_aio_read(struct kiocb *iocb, char __user *buf, | 1503 | extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, |
1504 | size_t count, loff_t pos); | 1504 | loff_t *ppos); |
1505 | extern ssize_t xip_file_readv(struct file *filp, const struct iovec *iov, | ||
1506 | unsigned long nr_segs, loff_t *ppos); | ||
1507 | extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, | 1505 | extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, |
1508 | size_t count, read_actor_t actor, | 1506 | size_t count, read_actor_t actor, |
1509 | void *target); | 1507 | void *target); |
1510 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); | 1508 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); |
1511 | extern ssize_t xip_file_aio_write(struct kiocb *iocb, const char __user *buf, | 1509 | extern ssize_t xip_file_write(struct file *filp, const char __user *buf, |
1512 | size_t count, loff_t pos); | 1510 | size_t len, loff_t *ppos); |
1513 | extern ssize_t xip_file_writev(struct file *file, const struct iovec *iov, | ||
1514 | unsigned long nr_segs, loff_t *ppos); | ||
1515 | extern int xip_truncate_page(struct address_space *mapping, loff_t from); | 1511 | extern int xip_truncate_page(struct address_space *mapping, loff_t from); |
1516 | #else | 1512 | #else |
1517 | static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | 1513 | static inline int xip_truncate_page(struct address_space *mapping, loff_t from) |