ocfs2: Fix memory overflow in cow_by_page.
authorTao Ma <tao.ma@oracle.com>
Sat, 30 Jan 2010 15:32:19 +0000 (23:32 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 3 Feb 2010 02:14:20 +0000 (18:14 -0800)
commitd622b89a2f58613a9c1407b22b02aecdd2187a7c
tree4987446f5308b324e74dd4bcc0da7c15f728d019
parent26636bf6b2010aa84c54d577231e017ba71493d0
ocfs2: Fix memory overflow in cow_by_page.

In ocfs2_duplicate_clusters_by_page, we calculate map_end
by shifting page_index. But actually in case we meet with
a large offset(say in a i686 box, poff_t is only 32 bits
and page_index=2056240), we will overflow. So change the
type of page_index to loff_t.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/refcounttree.c