aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2013-08-27 16:22:07 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2013-08-27 16:22:07 -0400
commit9d35814355e2baba9de523941e2ce52235359670 (patch)
tree5af04de1ed34ff510c146d666b54c844f62417f8 /fs/gfs2
parent7286b31eaba6404fa92f68d04626da1f395b3916 (diff)
GFS2: Merge ordered and writeback writepage
The writepages function was recently merged between writeback and ordered mode. This completes the change by doing the same with writepage. The remaining differences in writepage were left over from some earlier time and not actually doing anything useful. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/aops.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index ee48ad37d9c0..a9ea6f07774b 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -122,14 +122,13 @@ out:
122} 122}
123 123
124/** 124/**
125 * gfs2_writeback_writepage - Write page for writeback mappings 125 * gfs2_writepage - Write page for writeback mappings
126 * @page: The page 126 * @page: The page
127 * @wbc: The writeback control 127 * @wbc: The writeback control
128 * 128 *
129 */ 129 */
130 130
131static int gfs2_writeback_writepage(struct page *page, 131static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
132 struct writeback_control *wbc)
133{ 132{
134 int ret; 133 int ret;
135 134
@@ -141,32 +140,6 @@ static int gfs2_writeback_writepage(struct page *page,
141} 140}
142 141
143/** 142/**
144 * gfs2_ordered_writepage - Write page for ordered data files
145 * @page: The page to write
146 * @wbc: The writeback control
147 *
148 */
149
150static int gfs2_ordered_writepage(struct page *page,
151 struct writeback_control *wbc)
152{
153 struct inode *inode = page->mapping->host;
154 struct gfs2_inode *ip = GFS2_I(inode);
155 int ret;
156
157 ret = gfs2_writepage_common(page, wbc);
158 if (ret <= 0)
159 return ret;
160
161 if (!page_has_buffers(page)) {
162 create_empty_buffers(page, inode->i_sb->s_blocksize,
163 (1 << BH_Dirty)|(1 << BH_Uptodate));
164 }
165 gfs2_page_add_databufs(ip, page, 0, inode->i_sb->s_blocksize-1);
166 return block_write_full_page(page, gfs2_get_block_noalloc, wbc);
167}
168
169/**
170 * __gfs2_jdata_writepage - The core of jdata writepage 143 * __gfs2_jdata_writepage - The core of jdata writepage
171 * @page: The page to write 144 * @page: The page to write
172 * @wbc: The writeback control 145 * @wbc: The writeback control
@@ -1107,7 +1080,7 @@ cannot_release:
1107} 1080}
1108 1081
1109static const struct address_space_operations gfs2_writeback_aops = { 1082static const struct address_space_operations gfs2_writeback_aops = {
1110 .writepage = gfs2_writeback_writepage, 1083 .writepage = gfs2_writepage,
1111 .writepages = gfs2_writepages, 1084 .writepages = gfs2_writepages,
1112 .readpage = gfs2_readpage, 1085 .readpage = gfs2_readpage,
1113 .readpages = gfs2_readpages, 1086 .readpages = gfs2_readpages,
@@ -1123,7 +1096,7 @@ static const struct address_space_operations gfs2_writeback_aops = {
1123}; 1096};
1124 1097
1125static const struct address_space_operations gfs2_ordered_aops = { 1098static const struct address_space_operations gfs2_ordered_aops = {
1126 .writepage = gfs2_ordered_writepage, 1099 .writepage = gfs2_writepage,
1127 .writepages = gfs2_writepages, 1100 .writepages = gfs2_writepages,
1128 .readpage = gfs2_readpage, 1101 .readpage = gfs2_readpage,
1129 .readpages = gfs2_readpages, 1102 .readpages = gfs2_readpages,