summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2018-03-26 07:32:50 +0200
committerTheodore Ts'o <tytso@mit.edu>2018-03-26 07:32:50 +0200
commit043d20d1592a194b96fb19282396e46cda633180 (patch)
tree931cdcbc44de4c0351f653beca3feab7028ba6cb /fs/ext4
parentext4: don't complain about incorrect features when probing (diff)
downloadlinux-043d20d1592a194b96fb19282396e46cda633180.tar.xz
linux-043d20d1592a194b96fb19282396e46cda633180.zip
ext4: use generic_writepages instead of __writepage/write_cache_pages
Code cleanup. Instead of writing an internal static function, use the available generic_writepages(). Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 951a3d69ed17..435965598cb8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2694,15 +2694,6 @@ out:
return err;
}
-static int __writepage(struct page *page, struct writeback_control *wbc,
- void *data)
-{
- struct address_space *mapping = data;
- int ret = ext4_writepage(page, wbc);
- mapping_set_error(mapping, ret);
- return ret;
-}
-
static int ext4_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
@@ -2740,11 +2731,7 @@ static int ext4_writepages(struct address_space *mapping,
goto out_writepages;
if (ext4_should_journal_data(inode)) {
- struct blk_plug plug;
-
- blk_start_plug(&plug);
- ret = write_cache_pages(mapping, wbc, __writepage, mapping);
- blk_finish_plug(&plug);
+ ret = generic_writepages(mapping, wbc);
goto out_writepages;
}