From: deen Date: Thu, 4 Oct 2007 16:22:23 +0000 (+0000) Subject: Fix off-by-one error in file length calculation. X-Git-Tag: v1_8_0_110~1138 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=097d118dd47a69538d8b95d382ac0a785a279414;hp=40d50807a1eec5558be2167e011dbb2cbe3df5bf;p=fs%2Flustre-release.git Fix off-by-one error in file length calculation. Original patch by green. b=10919 i=adilger i=tianzy --- diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index cbea961..6fe8e04 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_i2obdexp(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);