File bnc#874705nodes-without-quorum.patch of Package libdlm.2839

Index: libdlm-4.0.4/dlm_controld/cpg.c
===================================================================
--- libdlm-4.0.4.orig/dlm_controld/cpg.c
+++ libdlm-4.0.4/dlm_controld/cpg.c
@@ -1261,6 +1261,19 @@ void process_lockspace_changes(void)
 	poll_fs = 0;
 
 	list_for_each_entry_safe(ls, safe, &lockspaces, list) {
+		if (ls->leaving && !(opt(enable_quorum_lockspace_ind) 
+					&& !cluster_quorate)) {
+		    log_group(ls, "confchg for our leave");
+		    stop_kernel(ls, 0);
+		    set_configfs_members(ls, ls->name, 0, NULL, 0, NULL);
+		    set_sysfs_event_done(ls->name, 0);
+		    cpg_finalize(ls->cpg_handle);
+		    client_dead(ls->cpg_client);
+		    purge_plocks(ls, our_nodeid, 1);
+		    list_del(&ls->list);
+		    free_ls(ls);
+		    return;
+		}
 		if (!list_empty(&ls->changes))
 			apply_changes(ls);
 	}
@@ -1414,7 +1427,10 @@ static void confchg_cb(cpg_handle_t hand
 		return;
 	}
 
-	if (ls->leaving && we_left(left_list, left_list_entries)) {
+	/*check currently if we have quorum in order to keep the 
+	  same behavior with other nodes*/
+	if (ls->leaving && we_left(left_list, left_list_entries)
+			&& !(opt(enable_quorum_lockspace_ind) && !cluster_quorate)) {
 		/* we called cpg_leave(), and this should be the final
 		   cpg callback we receive */
 		log_group(ls, "confchg for our leave");