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 /fs | |
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 'fs')
-rw-r--r-- | fs/ext2/file.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/ext2/file.c b/fs/ext2/file.c index 2b3d572365af..a484412fc782 100644 --- a/fs/ext2/file.c +++ b/fs/ext2/file.c | |||
@@ -58,17 +58,13 @@ struct file_operations ext2_file_operations = { | |||
58 | #ifdef CONFIG_EXT2_FS_XIP | 58 | #ifdef CONFIG_EXT2_FS_XIP |
59 | struct file_operations ext2_xip_file_operations = { | 59 | struct file_operations ext2_xip_file_operations = { |
60 | .llseek = generic_file_llseek, | 60 | .llseek = generic_file_llseek, |
61 | .read = do_sync_read, | 61 | .read = xip_file_read, |
62 | .write = do_sync_write, | 62 | .write = xip_file_write, |
63 | .aio_read = xip_file_aio_read, | ||
64 | .aio_write = xip_file_aio_write, | ||
65 | .ioctl = ext2_ioctl, | 63 | .ioctl = ext2_ioctl, |
66 | .mmap = xip_file_mmap, | 64 | .mmap = xip_file_mmap, |
67 | .open = generic_file_open, | 65 | .open = generic_file_open, |
68 | .release = ext2_release_file, | 66 | .release = ext2_release_file, |
69 | .fsync = ext2_sync_file, | 67 | .fsync = ext2_sync_file, |
70 | .readv = xip_file_readv, | ||
71 | .writev = xip_file_writev, | ||
72 | .sendfile = xip_file_sendfile, | 68 | .sendfile = xip_file_sendfile, |
73 | }; | 69 | }; |
74 | #endif | 70 | #endif |