aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/mmap.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-07-20 03:31:45 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-20 11:44:19 -0400
commit1833633803c7ef4d8f09877d3f1549cbd252f477 (patch)
treece69505de705701f838bd77c6b6b6bc18529bed0 /fs/ocfs2/mmap.c
parente228929bc257b963523ed75aa60d2ad77ece2189 (diff)
fix some conversion overflows
Fix page index to offset conversion overflows in buffer layer, ecryptfs, and ocfs2. It would be nice to convert the whole tree to page_offset, but for now just fix the bugs. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/mmap.c')
-rw-r--r--fs/ocfs2/mmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c
index ee64749e2eeb..98756156d298 100644
--- a/fs/ocfs2/mmap.c
+++ b/fs/ocfs2/mmap.c
@@ -89,7 +89,7 @@ static int __ocfs2_page_mkwrite(struct inode *inode, struct buffer_head *di_bh,
89{ 89{
90 int ret; 90 int ret;
91 struct address_space *mapping = inode->i_mapping; 91 struct address_space *mapping = inode->i_mapping;
92 loff_t pos = page->index << PAGE_CACHE_SHIFT; 92 loff_t pos = page_offset(page);
93 unsigned int len = PAGE_CACHE_SIZE; 93 unsigned int len = PAGE_CACHE_SIZE;
94 pgoff_t last_index; 94 pgoff_t last_index;
95 struct page *locked_page = NULL; 95 struct page *locked_page = NULL;