diff options
author | Christoph Hellwig <hch@lst.de> | 2019-07-01 17:54:34 -0400 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2019-07-03 08:45:18 -0400 |
commit | 59c01c5046cc0cf567d58cc7b59a704a36a06899 (patch) | |
tree | 843ebf4ac49cef1d4658f9aca7a5428150eb87ff | |
parent | eadd753580469f281912e28114a80e5822622cbe (diff) |
gfs2: merge gfs2_writepage_common into gfs2_writepage
There is no need to keep these two functions separate.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
-rw-r--r-- | fs/gfs2/aops.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 210e4a8d4e7b..4edf917752af 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
@@ -82,15 +82,11 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock, | |||
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * gfs2_writepage_common - Common bits of writepage | 85 | * gfs2_writepage - Write page for writeback mappings |
86 | * @page: The page to be written | 86 | * @page: The page |
87 | * @wbc: The writeback control | 87 | * @wbc: The writeback control |
88 | * | ||
89 | * Returns: 1 if writepage is ok, otherwise an error code or zero if no error. | ||
90 | */ | 88 | */ |
91 | 89 | static int gfs2_writepage(struct page *page, struct writeback_control *wbc) | |
92 | static int gfs2_writepage_common(struct page *page, | ||
93 | struct writeback_control *wbc) | ||
94 | { | 90 | { |
95 | struct inode *inode = page->mapping->host; | 91 | struct inode *inode = page->mapping->host; |
96 | struct gfs2_inode *ip = GFS2_I(inode); | 92 | struct gfs2_inode *ip = GFS2_I(inode); |
@@ -109,7 +105,9 @@ static int gfs2_writepage_common(struct page *page, | |||
109 | page->mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE); | 105 | page->mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE); |
110 | goto out; | 106 | goto out; |
111 | } | 107 | } |
112 | return 1; | 108 | |
109 | return nobh_writepage(page, gfs2_get_block_noalloc, wbc); | ||
110 | |||
113 | redirty: | 111 | redirty: |
114 | redirty_page_for_writepage(wbc, page); | 112 | redirty_page_for_writepage(wbc, page); |
115 | out: | 113 | out: |
@@ -117,24 +115,6 @@ out: | |||
117 | return 0; | 115 | return 0; |
118 | } | 116 | } |
119 | 117 | ||
120 | /** | ||
121 | * gfs2_writepage - Write page for writeback mappings | ||
122 | * @page: The page | ||
123 | * @wbc: The writeback control | ||
124 | * | ||
125 | */ | ||
126 | |||
127 | static int gfs2_writepage(struct page *page, struct writeback_control *wbc) | ||
128 | { | ||
129 | int ret; | ||
130 | |||
131 | ret = gfs2_writepage_common(page, wbc); | ||
132 | if (ret <= 0) | ||
133 | return ret; | ||
134 | |||
135 | return nobh_writepage(page, gfs2_get_block_noalloc, wbc); | ||
136 | } | ||
137 | |||
138 | /* This is the same as calling block_write_full_page, but it also | 118 | /* This is the same as calling block_write_full_page, but it also |
139 | * writes pages outside of i_size | 119 | * writes pages outside of i_size |
140 | */ | 120 | */ |