diff options
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r-- | fs/gfs2/ops_file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 48ec3d5e29eb..3b9e8de3500b 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -355,6 +355,9 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
355 | if (ret) | 355 | if (ret) |
356 | goto out; | 356 | goto out; |
357 | 357 | ||
358 | set_bit(GLF_DIRTY, &ip->i_gl->gl_flags); | ||
359 | set_bit(GIF_SW_PAGED, &ip->i_flags); | ||
360 | |||
358 | ret = gfs2_write_alloc_required(ip, pos, PAGE_CACHE_SIZE, &alloc_required); | 361 | ret = gfs2_write_alloc_required(ip, pos, PAGE_CACHE_SIZE, &alloc_required); |
359 | if (ret || !alloc_required) | 362 | if (ret || !alloc_required) |
360 | goto out_unlock; | 363 | goto out_unlock; |
@@ -395,8 +398,6 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
395 | goto out_unlock_page; | 398 | goto out_unlock_page; |
396 | } | 399 | } |
397 | ret = gfs2_allocate_page_backing(page); | 400 | ret = gfs2_allocate_page_backing(page); |
398 | if (!ret) | ||
399 | set_bit(GIF_SW_PAGED, &ip->i_flags); | ||
400 | 401 | ||
401 | out_unlock_page: | 402 | out_unlock_page: |
402 | unlock_page(page); | 403 | unlock_page(page); |