Whamcloud - gitweb
LU-5522 ldlm: remove expired lock from per-export list 34/11634/2
authorJohann Lombardi <johann.lombardi@intel.com>
Thu, 28 Aug 2014 12:42:56 +0000 (14:42 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 24 Sep 2014 01:28:39 +0000 (01:28 +0000)
Expired locks processed by the ldlm_elt thread might still be
referenced in the per-export BL AST list. Most of the time, it
has not impact except when a request for this export is still
being processed for this export and might scan the per-export
BL AST list.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I23745770983507ffd986de9ba056a03b11199a78
Reviewed-on: http://review.whamcloud.com/11634
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ldlm/ldlm_lockd.c

index bfb4af1..62baaf5 100644 (file)
@@ -237,6 +237,10 @@ static int expired_lock_main(void *arg)
                        export = class_export_lock_get(lock->l_export, lock);
                        spin_unlock_bh(&waiting_locks_spinlock);
 
+                       spin_lock_bh(&export->exp_bl_list_lock);
+                       list_del_init(&lock->l_exp_list);
+                       spin_unlock_bh(&export->exp_bl_list_lock);
+
                        do_dump++;
                        class_fail_export(export);
                        class_export_lock_put(export, lock);