diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2009-01-06 11:47:50 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-01-07 03:58:28 -0500 |
commit | c8f554b947e80a90e1b43bbd4fd26c27765b5f96 (patch) | |
tree | 748e71063be2f9fab57d765e78d1571c86fc1a91 /fs/gfs2 | |
parent | 0027ce681e3cd49fa34dab023574611f4384291d (diff) |
GFS2: Fix typo in gfs_page_mkwrite()
There is a typo in gfs2_page_mkwrite()
gfs2_write_alloc_required() expects pos to be the offset in bytes. However,
instead of the page index being shifted by by PAGE_CACHE_SHIFT, it was shifted
by (PAGE_CACHE_SIZE - inode->i_blkbits). This patch simply shifts the page
index by the proper amount.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-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 289c5f54ba53..93fe41b67f97 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -342,7 +342,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
342 | struct gfs2_inode *ip = GFS2_I(inode); | 342 | struct gfs2_inode *ip = GFS2_I(inode); |
343 | struct gfs2_sbd *sdp = GFS2_SB(inode); | 343 | struct gfs2_sbd *sdp = GFS2_SB(inode); |
344 | unsigned long last_index; | 344 | unsigned long last_index; |
345 | u64 pos = page->index << (PAGE_CACHE_SIZE - inode->i_blkbits); | 345 | u64 pos = page->index << PAGE_CACHE_SHIFT; |
346 | unsigned int data_blocks, ind_blocks, rblocks; | 346 | unsigned int data_blocks, ind_blocks, rblocks; |
347 | int alloc_required = 0; | 347 | int alloc_required = 0; |
348 | struct gfs2_holder gh; | 348 | struct gfs2_holder gh; |