diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2018-03-26 01:32:50 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-03-26 01:32:50 -0400 |
commit | 043d20d1592a194b96fb19282396e46cda633180 (patch) | |
tree | 931cdcbc44de4c0351f653beca3feab7028ba6cb | |
parent | 0d9366d67bcf066b028e57d09c9a86ce879bcc28 (diff) |
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>
-rw-r--r-- | fs/ext4/inode.c | 15 |
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: | |||
2694 | return err; | 2694 | return err; |
2695 | } | 2695 | } |
2696 | 2696 | ||
2697 | static int __writepage(struct page *page, struct writeback_control *wbc, | ||
2698 | void *data) | ||
2699 | { | ||
2700 | struct address_space *mapping = data; | ||
2701 | int ret = ext4_writepage(page, wbc); | ||
2702 | mapping_set_error(mapping, ret); | ||
2703 | return ret; | ||
2704 | } | ||
2705 | |||
2706 | static int ext4_writepages(struct address_space *mapping, | 2697 | static int ext4_writepages(struct address_space *mapping, |
2707 | struct writeback_control *wbc) | 2698 | struct writeback_control *wbc) |
2708 | { | 2699 | { |
@@ -2740,11 +2731,7 @@ static int ext4_writepages(struct address_space *mapping, | |||
2740 | goto out_writepages; | 2731 | goto out_writepages; |
2741 | 2732 | ||
2742 | if (ext4_should_journal_data(inode)) { | 2733 | if (ext4_should_journal_data(inode)) { |
2743 | struct blk_plug plug; | 2734 | ret = generic_writepages(mapping, wbc); |
2744 | |||
2745 | blk_start_plug(&plug); | ||
2746 | ret = write_cache_pages(mapping, wbc, __writepage, mapping); | ||
2747 | blk_finish_plug(&plug); | ||
2748 | goto out_writepages; | 2735 | goto out_writepages; |
2749 | } | 2736 | } |
2750 | 2737 | ||