diff options
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r-- | fs/gfs2/ops_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index a6b7a733fd4d..289c5f54ba53 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -355,7 +355,6 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
355 | goto out; | 355 | goto out; |
356 | 356 | ||
357 | set_bit(GIF_SW_PAGED, &ip->i_flags); | 357 | set_bit(GIF_SW_PAGED, &ip->i_flags); |
358 | gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks); | ||
359 | ret = gfs2_write_alloc_required(ip, pos, PAGE_CACHE_SIZE, &alloc_required); | 358 | ret = gfs2_write_alloc_required(ip, pos, PAGE_CACHE_SIZE, &alloc_required); |
360 | if (ret || !alloc_required) | 359 | if (ret || !alloc_required) |
361 | goto out_unlock; | 360 | goto out_unlock; |
@@ -367,6 +366,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
367 | ret = gfs2_quota_lock_check(ip); | 366 | ret = gfs2_quota_lock_check(ip); |
368 | if (ret) | 367 | if (ret) |
369 | goto out_alloc_put; | 368 | goto out_alloc_put; |
369 | gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks); | ||
370 | al->al_requested = data_blocks + ind_blocks; | 370 | al->al_requested = data_blocks + ind_blocks; |
371 | ret = gfs2_inplace_reserve(ip); | 371 | ret = gfs2_inplace_reserve(ip); |
372 | if (ret) | 372 | if (ret) |