From f5fbc97d452e11d606b91d30e9e646bdba64f8e3 Mon Sep 17 00:00:00 2001 From: niu Date: Wed, 6 Jul 2005 07:48:59 +0000 Subject: [PATCH] convert to u64 in case of overflow. - b 6450 --- lustre/llite/file.c | 5 +++-- lustre/llite/llite_mmap.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 719bd86..bed62c2 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -640,8 +640,9 @@ void ll_pgcache_remove_extent(struct inode *inode, struct lov_stripe_md *lsm, j = min(count - (i % count), end - i + 1); LASSERT(j > 0); LASSERT(inode->i_mapping); - if (ll_teardown_mmaps(inode->i_mapping, i << PAGE_CACHE_SHIFT, - ((i+j) << PAGE_CACHE_SHIFT) - 1) ) + if (ll_teardown_mmaps(inode->i_mapping, + (__u64)i << PAGE_CACHE_SHIFT, + ((__u64)(i+j) << PAGE_CACHE_SHIFT) - 1) ) break; } diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index c763110..203f793 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -475,7 +475,7 @@ int ll_teardown_mmaps(struct address_space *mapping, __u64 first, int rc = -ENOENT; ENTRY; - LASSERT(last > first); + LASSERTF(last > first, "last "LPU64" first "LPU64"\n", last, first); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) if (mapping_mapped(mapping)) { rc = 0; -- 1.8.3.1