aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/dlm/dlmmaster.c3
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 6d318b0bd816..320081d53f22 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2933,6 +2933,9 @@ static void dlm_remove_nonlocal_locks(struct dlm_ctxt *dlm,
2933 dlm_lockres_clear_refmap_bit(lock->ml.node, res); 2933 dlm_lockres_clear_refmap_bit(lock->ml.node, res);
2934 list_del_init(&lock->list); 2934 list_del_init(&lock->list);
2935 dlm_lock_put(lock); 2935 dlm_lock_put(lock);
2936 /* In a normal unlock, we would have added a
2937 * DLM_UNLOCK_FREE_LOCK action. Force it. */
2938 dlm_lock_put(lock);
2936 } 2939 }
2937 } 2940 }
2938 queue++; 2941 queue++;
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 550d4e62b320..db17727594ab 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -2130,11 +2130,16 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
2130 assert_spin_locked(&dlm->spinlock); 2130 assert_spin_locked(&dlm->spinlock);
2131 assert_spin_locked(&res->spinlock); 2131 assert_spin_locked(&res->spinlock);
2132 2132
2133 /* We do two dlm_lock_put(). One for removing from list and the other is
2134 * to force the DLM_UNLOCK_FREE_LOCK action so as to free the locks */
2135
2133 /* TODO: check pending_asts, pending_basts here */ 2136 /* TODO: check pending_asts, pending_basts here */
2134 list_for_each_entry_safe(lock, next, &res->granted, list) { 2137 list_for_each_entry_safe(lock, next, &res->granted, list) {
2135 if (lock->ml.node == dead_node) { 2138 if (lock->ml.node == dead_node) {
2136 list_del_init(&lock->list); 2139 list_del_init(&lock->list);
2137 dlm_lock_put(lock); 2140 dlm_lock_put(lock);
2141 /* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
2142 dlm_lock_put(lock);
2138 freed++; 2143 freed++;
2139 } 2144 }
2140 } 2145 }
@@ -2142,6 +2147,8 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
2142 if (lock->ml.node == dead_node) { 2147 if (lock->ml.node == dead_node) {
2143 list_del_init(&lock->list); 2148 list_del_init(&lock->list);
2144 dlm_lock_put(lock); 2149 dlm_lock_put(lock);
2150 /* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
2151 dlm_lock_put(lock);
2145 freed++; 2152 freed++;
2146 } 2153 }
2147 } 2154 }
@@ -2149,6 +2156,8 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
2149 if (lock->ml.node == dead_node) { 2156 if (lock->ml.node == dead_node) {
2150 list_del_init(&lock->list); 2157 list_del_init(&lock->list);
2151 dlm_lock_put(lock); 2158 dlm_lock_put(lock);
2159 /* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
2160 dlm_lock_put(lock);
2152 freed++; 2161 freed++;
2153 } 2162 }
2154 } 2163 }