Whamcloud - gitweb
LU-11003 ldlm: don't add canceling lock back to LRU 92/32692/2
authorMikhail Pershin <mike.pershin@intel.com>
Mon, 11 Jun 2018 06:44:01 +0000 (09:44 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 3 Jul 2018 18:05:22 +0000 (18:05 +0000)
When lock is converted check it is not canceling before
adding it back to LRU.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I278389f2a23b304d812f82ffb2dcee2ca70f5b21
Reviewed-on: https://review.whamcloud.com/32692
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_request.c

index 36bc26e..6ce7226 100644 (file)
@@ -1110,7 +1110,8 @@ static int lock_convert_interpret(const struct lu_env *env,
                         * is not there yet.
                         */
                        lock->l_policy_data.l_inodebits.cancel_bits = 0;
-                       if (!lock->l_readers && !lock->l_writers) {
+                       if (!lock->l_readers && !lock->l_writers &&
+                           !ldlm_is_canceling(lock)) {
                                spin_lock(&ns->ns_lock);
                                /* there is check for list_empty() inside */
                                ldlm_lock_remove_from_lru_nolock(lock);