Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: cleanup descriptions of filler arg

The often-NULL data arg to read_cache_page() and read_mapping_page()
functions is misdescribed as "destination for read data": no, it's the
first arg to the filler function, often struct file * to ->readpage().

Satisfy checkpatch.pl on those filler prototypes, and tidy up the
declarations in linux/pagemap.h.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Hugh Dickins and committed by
Linus Torvalds
5e5358e7 df077ac4

+11 -13
+5 -7
include/linux/pagemap.h
··· 255 255 extern struct page * grab_cache_page_nowait(struct address_space *mapping, 256 256 pgoff_t index); 257 257 extern struct page * read_cache_page_async(struct address_space *mapping, 258 - pgoff_t index, filler_t *filler, 259 - void *data); 258 + pgoff_t index, filler_t *filler, void *data); 260 259 extern struct page * read_cache_page(struct address_space *mapping, 261 - pgoff_t index, filler_t *filler, 262 - void *data); 260 + pgoff_t index, filler_t *filler, void *data); 263 261 extern struct page * read_cache_page_gfp(struct address_space *mapping, 264 262 pgoff_t index, gfp_t gfp_mask); 265 263 extern int read_cache_pages(struct address_space *mapping, 266 264 struct list_head *pages, filler_t *filler, void *data); 267 265 268 266 static inline struct page *read_mapping_page_async( 269 - struct address_space *mapping, 270 - pgoff_t index, void *data) 267 + struct address_space *mapping, 268 + pgoff_t index, void *data) 271 269 { 272 270 filler_t *filler = (filler_t *)mapping->a_ops->readpage; 273 271 return read_cache_page_async(mapping, index, filler, data); 274 272 } 275 273 276 274 static inline struct page *read_mapping_page(struct address_space *mapping, 277 - pgoff_t index, void *data) 275 + pgoff_t index, void *data) 278 276 { 279 277 filler_t *filler = (filler_t *)mapping->a_ops->readpage; 280 278 return read_cache_page(mapping, index, filler, data);
+6 -6
mm/filemap.c
··· 1792 1792 1793 1793 static struct page *__read_cache_page(struct address_space *mapping, 1794 1794 pgoff_t index, 1795 - int (*filler)(void *,struct page*), 1795 + int (*filler)(void *, struct page *), 1796 1796 void *data, 1797 1797 gfp_t gfp) 1798 1798 { ··· 1823 1823 1824 1824 static struct page *do_read_cache_page(struct address_space *mapping, 1825 1825 pgoff_t index, 1826 - int (*filler)(void *,struct page*), 1826 + int (*filler)(void *, struct page *), 1827 1827 void *data, 1828 1828 gfp_t gfp) 1829 1829 ··· 1863 1863 * @mapping: the page's address_space 1864 1864 * @index: the page index 1865 1865 * @filler: function to perform the read 1866 - * @data: destination for read data 1866 + * @data: first arg to filler(data, page) function, often left as NULL 1867 1867 * 1868 1868 * Same as read_cache_page, but don't wait for page to become unlocked 1869 1869 * after submitting it to the filler. ··· 1875 1875 */ 1876 1876 struct page *read_cache_page_async(struct address_space *mapping, 1877 1877 pgoff_t index, 1878 - int (*filler)(void *,struct page*), 1878 + int (*filler)(void *, struct page *), 1879 1879 void *data) 1880 1880 { 1881 1881 return do_read_cache_page(mapping, index, filler, data, mapping_gfp_mask(mapping)); ··· 1923 1923 * @mapping: the page's address_space 1924 1924 * @index: the page index 1925 1925 * @filler: function to perform the read 1926 - * @data: destination for read data 1926 + * @data: first arg to filler(data, page) function, often left as NULL 1927 1927 * 1928 1928 * Read into the page cache. If a page already exists, and PageUptodate() is 1929 1929 * not set, try to fill the page then wait for it to become unlocked. ··· 1932 1932 */ 1933 1933 struct page *read_cache_page(struct address_space *mapping, 1934 1934 pgoff_t index, 1935 - int (*filler)(void *,struct page*), 1935 + int (*filler)(void *, struct page *), 1936 1936 void *data) 1937 1937 { 1938 1938 return wait_on_page_read(read_cache_page_async(mapping, index, filler, data));