Whamcloud - gitweb
LU-2827 ldlm: wrong handling of ldlm resends
[fs/lustre-release.git] / lustre / ldlm / ldlm_plain.c
index a543519..86a893b 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, Whamcloud, Inc.
+ * Copyright (c) 2011, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -149,8 +149,9 @@ int ldlm_process_plain_lock(struct ldlm_lock *lock, __u64 *flags,
         int rc;
         ENTRY;
 
-        check_res_locked(res);
-        LASSERT(cfs_list_empty(&res->lr_converting));
+       LASSERT(lock->l_granted_mode != lock->l_req_mode);
+       check_res_locked(res);
+       LASSERT(cfs_list_empty(&res->lr_converting));
 
         if (!first_enq) {
                 LASSERT(work_list != NULL);