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>
* 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);