1 ext4: use generic_writepages instead of __writepage/write_cache_pages
3 From: Goldwyn Rodrigues <rgoldwyn@suse.com>
5 Code cleanup. Instead of writing an internal static function, use the
6 available generic_writepages().
8 Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 fs/ext4/inode.c | 15 +--------------
12 1 file changed, 1 insertion(+), 14 deletions(-)
14 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
15 index c94780075b04..97f57769e02a 100644
18 @@ -2694,15 +2694,6 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
22 -static int __writepage(struct page *page, struct writeback_control *wbc,
25 - struct address_space *mapping = data;
26 - int ret = ext4_writepage(page, wbc);
27 - mapping_set_error(mapping, ret);
31 static int ext4_writepages(struct address_space *mapping,
32 struct writeback_control *wbc)
34 @@ -2740,11 +2731,7 @@ static int ext4_writepages(struct address_space *mapping,
37 if (ext4_should_journal_data(inode)) {
38 - struct blk_plug plug;
40 - blk_start_plug(&plug);
41 - ret = write_cache_pages(mapping, wbc, __writepage, mapping);
42 - blk_finish_plug(&plug);
43 + ret = generic_writepages(mapping, wbc);