aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-02-08 07:21:24 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:39 -0500
commit36e789144267105e0b3f2b9bca7db3184fce50dc (patch)
treecff6b92b2d54cf5e88db3f0fd71071a6b80b06f5 /mm
parent7437a51b30743ff1488981a393fc9e67894bf757 (diff)
kill do_generic_mapping_read
do_generic_mapping_read was used by gfs2 for internals reads, but this use of the interface was rather suboptimal (as was the whole interface) and has been replaced by an internal helper now. This patch kills do_generic_mapping_read and surrounding damage in preparation of additional cleanups for the buffered read path. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/filemap.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 4eb958c402fe..b7b1be6dbd83 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -875,9 +875,7 @@ static void shrink_readahead_size_eio(struct file *filp,
875} 875}
876 876
877/** 877/**
878 * do_generic_mapping_read - generic file read routine 878 * do_generic_file_read - generic file read routine
879 * @mapping: address_space to be read
880 * @ra: file's readahead state
881 * @filp: the file to read 879 * @filp: the file to read
882 * @ppos: current file position 880 * @ppos: current file position
883 * @desc: read_descriptor 881 * @desc: read_descriptor
@@ -888,18 +886,13 @@ static void shrink_readahead_size_eio(struct file *filp,
888 * 886 *
889 * This is really ugly. But the goto's actually try to clarify some 887 * This is really ugly. But the goto's actually try to clarify some
890 * of the logic when it comes to error handling etc. 888 * of the logic when it comes to error handling etc.
891 *
892 * Note the struct file* is only passed for the use of readpage.
893 * It may be NULL.
894 */ 889 */
895void do_generic_mapping_read(struct address_space *mapping, 890static void do_generic_file_read(struct file *filp, loff_t *ppos,
896 struct file_ra_state *ra, 891 read_descriptor_t *desc, read_actor_t actor)
897 struct file *filp,
898 loff_t *ppos,
899 read_descriptor_t *desc,
900 read_actor_t actor)
901{ 892{
893 struct address_space *mapping = filp->f_mapping;
902 struct inode *inode = mapping->host; 894 struct inode *inode = mapping->host;
895 struct file_ra_state *ra = &filp->f_ra;
903 pgoff_t index; 896 pgoff_t index;
904 pgoff_t last_index; 897 pgoff_t last_index;
905 pgoff_t prev_index; 898 pgoff_t prev_index;
@@ -1091,7 +1084,6 @@ out:
1091 if (filp) 1084 if (filp)
1092 file_accessed(filp); 1085 file_accessed(filp);
1093} 1086}
1094EXPORT_SYMBOL(do_generic_mapping_read);
1095 1087
1096int file_read_actor(read_descriptor_t *desc, struct page *page, 1088int file_read_actor(read_descriptor_t *desc, struct page *page,
1097 unsigned long offset, unsigned long size) 1089 unsigned long offset, unsigned long size)