During ldlm_lock_cancel()->ldlm_cancel_callback(), the lock could
possibly be added back to waiting list with no resource lock holding.
Put back the second checking and removing from the waiting list.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I8841422d6e2f6bf92efa24d542583936123ead66
Reviewed-on: http://review.whamcloud.com/20509
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
/* Releases cancel callback. */
ldlm_cancel_callback(lock);
- LASSERT(!ldlm_is_waited(lock));
+ /* Yes, second time, just in case it was added again while we were
+ * running with no res lock in ldlm_cancel_callback */
+ if (ldlm_is_waited(lock))
+ ldlm_del_waiting_lock(lock);
ldlm_resource_unlink_lock(lock);
ldlm_lock_destroy_nolock(lock);