Skip to content

Commit 1b938c0

Browse files
Matthew Wilcoxtorvalds
authored andcommitted
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(). Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Dheeraj Reddy <dheeraj.reddy@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 399ba0b commit 1b938c0

4 files changed

Lines changed: 7 additions & 20 deletions

File tree

‎fs/buffer.c‎

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,10 +2879,9 @@ EXPORT_SYMBOL(block_truncate_page);
28792879

28802880
/*
28812881
* The generic ->writepage function for buffer-backed address_spaces
2882-
* this form passes in the end_io handler used to finish the IO.
28832882
*/
2884-
int block_write_full_page_endio(struct page *page, get_block_t *get_block,
2885-
struct writeback_control *wbc, bh_end_io_t *handler)
2883+
int block_write_full_page(struct page *page, get_block_t *get_block,
2884+
struct writeback_control *wbc)
28862885
{
28872886
struct inode * const inode = page->mapping->host;
28882887
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,
28922891
/* Is the page fully inside i_size? */
28932892
if (page->index < end_index)
28942893
return __block_write_full_page(inode, page, get_block, wbc,
2895-
handler);
2894+
end_buffer_async_write);
28962895

28972896
/* Is the page fully outside i_size? (truncate in progress) */
28982897
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,
29152914
* writes to that region are not written out to the file."
29162915
*/
29172916
zero_user_segment(page, offset, PAGE_CACHE_SIZE);
2918-
return __block_write_full_page(inode, page, get_block, wbc, handler);
2919-
}
2920-
EXPORT_SYMBOL(block_write_full_page_endio);
2921-
2922-
/*
2923-
* The generic ->writepage function for buffer-backed address_spaces
2924-
*/
2925-
int 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);
2917+
return __block_write_full_page(inode, page, get_block, wbc,
2918+
end_buffer_async_write);
29302919
}
29312920
EXPORT_SYMBOL(block_write_full_page);
29322921

‎fs/ext4/page-io.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
429429
block_start = bh_offset(bh);
430430
if (block_start >= len) {
431431
/*
432-
* Comments copied from block_write_full_page_endio:
432+
* Comments copied from block_write_full_page:
433433
*
434434
* The page straddles i_size. It must be zeroed out on
435435
* each and every writepage invocation because it may

‎fs/ocfs2/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,
828828
/*
829829
* fs-writeback will release the dirty pages without page lock
830830
* whose offset are over inode size, the release happens at
831-
* block_write_full_page_endio().
831+
* block_write_full_page().
832832
*/
833833
i_size_write(inode, abs_to);
834834
inode->i_blocks = ocfs2_inode_sector_count(inode);

‎include/linux/buffer_head.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ void block_invalidatepage(struct page *page, unsigned int offset,
207207
unsigned int length);
208208
int block_write_full_page(struct page *page, get_block_t *get_block,
209209
struct writeback_control *wbc);
210-
int block_write_full_page_endio(struct page *page, get_block_t *get_block,
211-
struct writeback_control *wbc, bh_end_io_t *handler);
212210
int block_read_full_page(struct page*, get_block_t*);
213211
int block_is_partially_uptodate(struct page *page, unsigned long from,
214212
unsigned long count);

0 commit comments

Comments
 (0)