History

fs/buffer.c: remove block_write_full_page_endio()

The last in-tree caller of block_write_full_page_endio() was removed in January 2013. It's time to remove the EXPORT_SYMBOL, which leaves block_write_full_page() as the only caller of block_write_full_page_endio(), so inline block_write_full_page_endio() into block_write_full_page().

Matthew Wilcox committed 12 years ago

Commit 1b938c01 parent 399ba0b4 files · +7 −20Browse files

Unified · Split

4 files
  1. fs/buffer.c +5 −16
  2. fs/ext4/page-io.c +1 −1
  3. fs/ocfs2/file.c +1 −1
  4. include/linux/buffer_head.h +0 −2
fs/buffer.c+5−16
@@ -2879,10 +2879,9 @@ EXPORT_SYMBOL(block_truncate_page); · 2878 unmodified lines
2879 2879
2880/*2880/*
2881 * The generic ->writepage function for buffer-backed address_spaces2881 * The generic ->writepage function for buffer-backed address_spaces
2882 * this form passes in the end_io handler used to finish the IO.
2883 */2882 */
2884int block_write_full_page_endio(struct page *page, get_block_t *get_block,2883int block_write_full_page(struct page *page, get_block_t *get_block,
2885 struct writeback_control *wbc, bh_end_io_t *handler)2884 struct writeback_control *wbc)
2886{2885{
2887 struct inode * const inode = page->mapping->host;2886 struct inode * const inode = page->mapping->host;
2888 loff_t i_size = i_size_read(inode);2887 loff_t i_size = i_size_read(inode);
@@ -2892,7 +2891,7 @@ int block_write_full_page_endio(struct page *page, get_block_t *get_block, · 3 unmodified lines
2892 /* Is the page fully inside i_size? */2891 /* Is the page fully inside i_size? */
2893 if (page->index < end_index)2892 if (page->index < end_index)
2894 return __block_write_full_page(inode, page, get_block, wbc,2893 return __block_write_full_page(inode, page, get_block, wbc,
2895 handler);2894 end_buffer_async_write);
2896 2895
2897 /* Is the page fully outside i_size? (truncate in progress) */2896 /* Is the page fully outside i_size? (truncate in progress) */
2898 offset = i_size & (PAGE_CACHE_SIZE-1);2897 offset = i_size & (PAGE_CACHE_SIZE-1);
@@ -2915,18 +2914,8 @@ int block_write_full_page_endio(struct page *page, get_block_t *get_block, · 16 unmodified lines
2915 * writes to that region are not written out to the file."2914 * writes to that region are not written out to the file."
2916 */2915 */
2917 zero_user_segment(page, offset, PAGE_CACHE_SIZE);2916 zero_user_segment(page, offset, PAGE_CACHE_SIZE);
2918 return __block_write_full_page(inode, page, get_block, wbc, handler);2917 return __block_write_full_page(inode, page, get_block, wbc,
2919}2918 end_buffer_async_write);
2920EXPORT_SYMBOL(block_write_full_page_endio);
2921
2922/*
2923 * The generic ->writepage function for buffer-backed address_spaces
2924 */
2925int block_write_full_page(struct page *page, get_block_t *get_block,
2926 struct writeback_control *wbc)
2927{
2928 return block_write_full_page_endio(page, get_block, wbc,
2929 end_buffer_async_write);
2930}2919}
2931EXPORT_SYMBOL(block_write_full_page);2920EXPORT_SYMBOL(block_write_full_page);
2932 2921
fs/ext4/page-io.c+1−1
@@ -429,7 +429,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io, · 428 unmodified lines
429 block_start = bh_offset(bh);429 block_start = bh_offset(bh);
430 if (block_start >= len) {430 if (block_start >= len) {
431 /*431 /*
432 * Comments copied from block_write_full_page_endio:432 * Comments copied from block_write_full_page:
433 *433 *
434 * The page straddles i_size. It must be zeroed out on434 * The page straddles i_size. It must be zeroed out on
435 * each and every writepage invocation because it may435 * each and every writepage invocation because it may
fs/ocfs2/file.c+1−1
@@ -828,7 +828,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from, · 827 unmodified lines
828 /*828 /*
829 * fs-writeback will release the dirty pages without page lock829 * fs-writeback will release the dirty pages without page lock
830 * whose offset are over inode size, the release happens at830 * whose offset are over inode size, the release happens at
831 * block_write_full_page_endio().831 * block_write_full_page().
832 */832 */
833 i_size_write(inode, abs_to);833 i_size_write(inode, abs_to);
834 inode->i_blocks = ocfs2_inode_sector_count(inode);834 inode->i_blocks = ocfs2_inode_sector_count(inode);
include/linux/buffer_head.h+0−2
@@ -207,8 +207,6 @@ void block_invalidatepage(struct page *page, unsigned int offset, · 206 unmodified lines
207 unsigned int length);207 unsigned int length);
208int block_write_full_page(struct page *page, get_block_t *get_block,208int block_write_full_page(struct page *page, get_block_t *get_block,
209 struct writeback_control *wbc);209 struct writeback_control *wbc);
210int block_write_full_page_endio(struct page *page, get_block_t *get_block,
211 struct writeback_control *wbc, bh_end_io_t *handler);
212int block_read_full_page(struct page*, get_block_t*);210int block_read_full_page(struct page*, get_block_t*);
213int block_is_partially_uptodate(struct page *page, unsigned long from,211int block_is_partially_uptodate(struct page *page, unsigned long from,
214 unsigned long count);212 unsigned long count);