From f3ed577f338dd31119106f0503f8c359321bb0fc Mon Sep 17 00:00:00 2001 From: deen Date: Thu, 4 Oct 2007 16:39:11 +0000 Subject: [PATCH 1/1] Fix off-by-one error in file length calculation. Original patch by green. b=10919 i=adilger i=tianzy --- lustre/llite/llite_mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index e45f84d..40a89a5 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -435,7 +435,7 @@ struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address, lov_stripe_lock(lsm); if (mode == LCK_PW) obd_adjust_kms(ll_i2dtexp(inode), lsm, - min_t(loff_t, policy.l_extent.end, + min_t(loff_t, policy.l_extent.end + 1, i_size_read(inode)), 0); lov_stripe_unlock(lsm); -- 1.8.3.1