aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_file.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-03-09 05:03:51 -0400
committerSteven Whitehouse <steve@dolmen.chygwyn.com>2009-03-24 07:21:27 -0400
commit6bac243f0793499782267342eba852a8a6cc7ac4 (patch)
tree8cf9bb9fa54767c6207bc7f72d75364c290702d9 /fs/gfs2/ops_file.c
parent02ffad08e838997fad3de05c85560a57e5fd92de (diff)
GFS2: Clean up of glops.c
This cleans up a number of bits of code mostly based in glops.c. A couple of simple functions have been merged into the callers to make it more obvious what is going on, the mysterious raising of i_writecount around the truncate_inode_pages() call has been removed. The meta_go_* operations have been renamed rgrp_go_* since that is the only lock type that they are used with. The unused argument of gfs2_read_sb has been removed. Also a bug has been fixed where a check for the rindex inode was in the wrong callback. More comments are added, and the debugging code is improved too. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r--fs/gfs2/ops_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 99d726f1c7a6..48ec3d5e29eb 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 if (ret) 355 if (ret)
356 goto out; 356 goto out;
357 357
358 set_bit(GIF_SW_PAGED, &ip->i_flags);
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;
@@ -396,6 +395,8 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page)
396 goto out_unlock_page; 395 goto out_unlock_page;
397 } 396 }
398 ret = gfs2_allocate_page_backing(page); 397 ret = gfs2_allocate_page_backing(page);
398 if (!ret)
399 set_bit(GIF_SW_PAGED, &ip->i_flags);
399 400
400out_unlock_page: 401out_unlock_page:
401 unlock_page(page); 402 unlock_page(page);