aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_file.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-01-17 10:12:03 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2008-01-25 03:20:15 -0500
commitb7fe2e391ee7b711d6dfd6a694d60c4f21113cbb (patch)
tree4a5d141ffd4ae77dc6ce1a47b0bb8ce9d6d7c685 /fs/gfs2/ops_file.c
parent3e5cd0877e6d2f059dc36b8206cb7e93938151db (diff)
[GFS2] Fix page_mkwrite truncation race path
There was a bug in the truncation/invalidation race path for ->page_mkwrite for gfs2. It ought to return 0 so that the effect is the same as if the page was truncated at any of the other points at which the page_lock is dropped. This will result in the restart of the whole page fault path. If it was due to a real truncation (as opposed to an invalidate because we let a glock go) then the ->fault path will pick that up when it gets called again. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r--fs/gfs2/ops_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index d7f4726ae0ce..f4842f2548cd 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -394,6 +394,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page)
394 last_index = ip->i_inode.i_size >> PAGE_CACHE_SHIFT; 394 last_index = ip->i_inode.i_size >> PAGE_CACHE_SHIFT;
395 if (page->index > last_index) 395 if (page->index > last_index)
396 goto out_unlock_page; 396 goto out_unlock_page;
397 ret = 0;
397 if (!PageUptodate(page) || page->mapping != ip->i_inode.i_mapping) 398 if (!PageUptodate(page) || page->mapping != ip->i_inode.i_mapping)
398 goto out_unlock_page; 399 goto out_unlock_page;
399 if (gfs2_is_stuffed(ip)) { 400 if (gfs2_is_stuffed(ip)) {