diff options
-rw-r--r-- | include/linux/fs.h | 15 | ||||
-rw-r--r-- | mm/filemap.c | 18 |
2 files changed, 5 insertions, 28 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1137a8828089..3db22fc2249a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1807,9 +1807,6 @@ extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | |||
1807 | unsigned long, loff_t, loff_t *, size_t, ssize_t); | 1807 | unsigned long, loff_t, loff_t *, size_t, ssize_t); |
1808 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); | 1808 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); |
1809 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); | 1809 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); |
1810 | extern void do_generic_mapping_read(struct address_space *mapping, | ||
1811 | struct file_ra_state *, struct file *, | ||
1812 | loff_t *, read_descriptor_t *, read_actor_t); | ||
1813 | extern int generic_segment_checks(const struct iovec *iov, | 1810 | extern int generic_segment_checks(const struct iovec *iov, |
1814 | unsigned long *nr_segs, size_t *count, int access_flags); | 1811 | unsigned long *nr_segs, size_t *count, int access_flags); |
1815 | 1812 | ||
@@ -1847,18 +1844,6 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | |||
1847 | } | 1844 | } |
1848 | #endif | 1845 | #endif |
1849 | 1846 | ||
1850 | static inline void do_generic_file_read(struct file * filp, loff_t *ppos, | ||
1851 | read_descriptor_t * desc, | ||
1852 | read_actor_t actor) | ||
1853 | { | ||
1854 | do_generic_mapping_read(filp->f_mapping, | ||
1855 | &filp->f_ra, | ||
1856 | filp, | ||
1857 | ppos, | ||
1858 | desc, | ||
1859 | actor); | ||
1860 | } | ||
1861 | |||
1862 | #ifdef CONFIG_BLOCK | 1847 | #ifdef CONFIG_BLOCK |
1863 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 1848 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
1864 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 1849 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
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 | */ |
895 | void do_generic_mapping_read(struct address_space *mapping, | 890 | static 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 | } |
1094 | EXPORT_SYMBOL(do_generic_mapping_read); | ||
1095 | 1087 | ||
1096 | int file_read_actor(read_descriptor_t *desc, struct page *page, | 1088 | int file_read_actor(read_descriptor_t *desc, struct page *page, |
1097 | unsigned long offset, unsigned long size) | 1089 | unsigned long offset, unsigned long size) |