aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/ops_address.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index bdd4d6b48721..45afd0508689 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -131,8 +131,8 @@ static int get_block_noalloc(struct inode *inode, sector_t lblock,
131static int gfs2_writepage(struct page *page, struct writeback_control *wbc) 131static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
132{ 132{
133 struct inode *inode = page->mapping->host; 133 struct inode *inode = page->mapping->host;
134 struct gfs2_inode *ip = GFS2_I(page->mapping->host); 134 struct gfs2_inode *ip = GFS2_I(inode);
135 struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host); 135 struct gfs2_sbd *sdp = GFS2_SB(inode);
136 loff_t i_size = i_size_read(inode); 136 loff_t i_size = i_size_read(inode);
137 pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT; 137 pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
138 unsigned offset; 138 unsigned offset;
@@ -158,6 +158,10 @@ static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
158 error = gfs2_trans_begin(sdp, RES_DINODE + 1, 0); 158 error = gfs2_trans_begin(sdp, RES_DINODE + 1, 0);
159 if (error) 159 if (error)
160 goto out_ignore; 160 goto out_ignore;
161 if (!page_has_buffers(page)) {
162 create_empty_buffers(page, inode->i_sb->s_blocksize,
163 (1 << BH_Dirty)|(1 << BH_Uptodate));
164 }
161 gfs2_page_add_databufs(ip, page, 0, sdp->sd_vfs->s_blocksize-1); 165 gfs2_page_add_databufs(ip, page, 0, sdp->sd_vfs->s_blocksize-1);
162 done_trans = 1; 166 done_trans = 1;
163 } 167 }