From: Oleg Drokin <[email protected]>

Shrinking sublock at ldlm lock cancel time means whoever happened
to attach to this lock just before will reenqueue the wrong lock.

Lustre-change: http://review.whamcloud.com/7569
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3027
Signed-off-by: Oleg Drokin <[email protected]>
Signed-off-by: Jian Yu <[email protected]>
Signed-off-by: Jinshan Xiong <[email protected]>
Reviewed-by: Patrick Farrell <[email protected]>
Reviewed-by: Bobi Jam <[email protected]>
Signed-off-by: Peng Tao <[email protected]>
Signed-off-by: Andreas Dilger <[email protected]>
---
 drivers/staging/lustre/lustre/lov/lovsub_lock.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lov/lovsub_lock.c 
b/drivers/staging/lustre/lustre/lov/lovsub_lock.c
index 80305aa..b38c30d 100644
--- a/drivers/staging/lustre/lustre/lov/lovsub_lock.c
+++ b/drivers/staging/lustre/lustre/lov/lovsub_lock.c
@@ -208,7 +208,10 @@ int lov_sublock_modify(const struct lu_env *env, struct 
lov_lock *lov,
        pd->cld_mode = parent_descr->cld_mode;
        pd->cld_gid  = parent_descr->cld_gid;
        lovsub_lock_descr_map(d, subobj->lso_super, subobj->lso_index, pd);
-       lov->lls_sub[idx].sub_got = *d;
+
+       /* LU-3027: only update extent of lock */
+       lov->lls_sub[idx].sub_got.cld_start = d->cld_start;
+       lov->lls_sub[idx].sub_got.cld_end = d->cld_end;
        /*
         * Notify top-lock about modification, if lock description changes
         * materially.
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to