diff options
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index daadcd2e755f..237ee6a940df 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -382,8 +382,10 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
382 | rblocks = RES_DINODE + ind_blocks; | 382 | rblocks = RES_DINODE + ind_blocks; |
383 | if (gfs2_is_jdata(ip)) | 383 | if (gfs2_is_jdata(ip)) |
384 | rblocks += data_blocks ? data_blocks : 1; | 384 | rblocks += data_blocks ? data_blocks : 1; |
385 | if (ind_blocks || data_blocks) | 385 | if (ind_blocks || data_blocks) { |
386 | rblocks += RES_STATFS + RES_QUOTA; | 386 | rblocks += RES_STATFS + RES_QUOTA; |
387 | rblocks += gfs2_rg_blocks(al); | ||
388 | } | ||
387 | ret = gfs2_trans_begin(sdp, rblocks, 0); | 389 | ret = gfs2_trans_begin(sdp, rblocks, 0); |
388 | if (ret) | 390 | if (ret) |
389 | goto out_trans_fail; | 391 | goto out_trans_fail; |