From: Oleg Drokin <oleg.dro...@intel.com>

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 <oleg.dro...@intel.com>
Signed-off-by: Jian Yu <jian...@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xi...@intel.com>
Reviewed-by: Patrick Farrell <p...@cray.com>
Reviewed-by: Bobi Jam <bobi...@gmail.com>
Signed-off-by: Peng Tao <bergw...@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dil...@intel.com>
---
 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 majord...@vger.kernel.org
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