summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/aops.c32
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 89static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
92static 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
113redirty: 111redirty:
114 redirty_page_for_writepage(wbc, page); 112 redirty_page_for_writepage(wbc, page);
115out: 113out:
@@ -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
127static 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 */