Whamcloud - gitweb
Branch HEAD
authorzam <zam>
Tue, 8 Dec 2009 21:02:35 +0000 (21:02 +0000)
committerzam <zam>
Tue, 8 Dec 2009 21:02:35 +0000 (21:02 +0000)
b=21314
i=alexey.lyashkov
i=alexander.zarochentsev

keep lock reference when class_export_lock_put accesses the lock.

lustre/ldlm/ldlm_lockd.c

index 51e5fee..9cc6b99 100644 (file)
@@ -211,13 +211,14 @@ static int expired_lock_main(void *arg)
                         export = class_export_lock_get(lock->l_export, lock);
                         spin_unlock_bh(&waiting_locks_spinlock);
 
-                        /* release extra ref grabbed by ldlm_add_waiting_lock()
-                         * or ldlm_failed_ast() */
-                        LDLM_LOCK_RELEASE(lock);
-
                         do_dump++;
                         class_fail_export(export);
                         class_export_lock_put(export, lock);
+
+                        /* release extra ref grabbed by ldlm_add_waiting_lock()
+                         * or ldlm_failed_ast() */
+                        LDLM_LOCK_RELEASE(lock);
                         spin_lock_bh(&waiting_locks_spinlock);
                 }
                 spin_unlock_bh(&waiting_locks_spinlock);