Skip to content

Commit 9d35814

Browse files
committed
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>
1 parent 7286b31 commit 9d35814

1 file changed

Lines changed: 4 additions & 31 deletions

File tree

‎fs/gfs2/aops.c‎

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,13 @@ static int gfs2_writepage_common(struct page *page,
122122
}
123123

124124
/**
125-
* gfs2_writeback_writepage - Write page for writeback mappings
125+
* gfs2_writepage - Write page for writeback mappings
126126
* @page: The page
127127
* @wbc: The writeback control
128128
*
129129
*/
130130

131-
static int gfs2_writeback_writepage(struct page *page,
132-
struct writeback_control *wbc)
131+
static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
133132
{
134133
int ret;
135134

@@ -140,32 +139,6 @@ static int gfs2_writeback_writepage(struct page *page,
140139
return nobh_writepage(page, gfs2_get_block_noalloc, wbc);
141140
}
142141

143-
/**
144-
* gfs2_ordered_writepage - Write page for ordered data files
145-
* @page: The page to write
146-
* @wbc: The writeback control
147-
*
148-
*/
149-
150-
static 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-
169142
/**
170143
* __gfs2_jdata_writepage - The core of jdata writepage
171144
* @page: The page to write
@@ -1107,7 +1080,7 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask)
11071080
}
11081081

11091082
static const struct address_space_operations gfs2_writeback_aops = {
1110-
.writepage = gfs2_writeback_writepage,
1083+
.writepage = gfs2_writepage,
11111084
.writepages = gfs2_writepages,
11121085
.readpage = gfs2_readpage,
11131086
.readpages = gfs2_readpages,
@@ -1123,7 +1096,7 @@ static const struct address_space_operations gfs2_writeback_aops = {
11231096
};
11241097

11251098
static const struct address_space_operations gfs2_ordered_aops = {
1126-
.writepage = gfs2_ordered_writepage,
1099+
.writepage = gfs2_writepage,
11271100
.writepages = gfs2_writepages,
11281101
.readpage = gfs2_readpage,
11291102
.readpages = gfs2_readpages,

0 commit comments

Comments
 (0)