From 287741d0a624d84e7f3f4e507c99a1bfe11a9a28 Mon Sep 17 00:00:00 2001
From: phil <phil>
Date: Tue, 24 Feb 2004 07:25:06 +0000
Subject: [PATCH] Fix a fencepost I was pretty sure I had already fixed (I
 checked; the other places were still fixed).  NB: a lock on [x,y] protects a
 KMS of up to y+1 bytes.

---
 lustre/lov/lov_obd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c
index e9c8c12fbe..7d657f2e08 100644
--- a/lustre/lov/lov_obd.c
+++ b/lustre/lov/lov_obd.c
@@ -2079,7 +2079,7 @@ static int lov_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
                         loi->loi_rss = tmp;
                         // Extend KMS up to the end of this lock, and no further
                         if (tmp > lock->l_policy_data.l_extent.end)
-                                tmp = lock->l_policy_data.l_extent.end;
+                                tmp = lock->l_policy_data.l_extent.end + 1;
                         if (tmp > loi->loi_kms) {
                                 CDEBUG(D_INODE, "lock acquired, setting rss="
                                        LPU64", kms="LPU64"\n", loi->loi_rss,
-- 
GitLab