ocfs2: replace strnicmp with strncasecmp
[sfrench/cifs-2.6.git] / fs / ocfs2 / cluster / heartbeat.c
index 73039295d0d1f35205e060220521934afd33ff27..eb9d48746ab4008acc1a529c37a15ca98a00c882 100644 (file)
@@ -2244,7 +2244,7 @@ ssize_t o2hb_heartbeat_group_mode_store(struct o2hb_heartbeat_group *group,
                return -EINVAL;
 
        for (i = 0; i < O2HB_HEARTBEAT_NUM_MODES; ++i) {
-               if (strnicmp(page, o2hb_heartbeat_mode_desc[i], len))
+               if (strncasecmp(page, o2hb_heartbeat_mode_desc[i], len))
                        continue;
 
                ret = o2hb_global_heartbeat_mode_set(i);
@@ -2572,6 +2572,25 @@ int o2hb_check_node_heartbeating(u8 node_num)
 }
 EXPORT_SYMBOL_GPL(o2hb_check_node_heartbeating);
 
+int o2hb_check_node_heartbeating_no_sem(u8 node_num)
+{
+       unsigned long testing_map[BITS_TO_LONGS(O2NM_MAX_NODES)];
+       unsigned long flags;
+
+       spin_lock_irqsave(&o2hb_live_lock, flags);
+       o2hb_fill_node_map_from_callback(testing_map, sizeof(testing_map));
+       spin_unlock_irqrestore(&o2hb_live_lock, flags);
+       if (!test_bit(node_num, testing_map)) {
+               mlog(ML_HEARTBEAT,
+                    "node (%u) does not have heartbeating enabled.\n",
+                    node_num);
+               return 0;
+       }
+
+       return 1;
+}
+EXPORT_SYMBOL_GPL(o2hb_check_node_heartbeating_no_sem);
+
 int o2hb_check_node_heartbeating_from_callback(u8 node_num)
 {
        unsigned long testing_map[BITS_TO_LONGS(O2NM_MAX_NODES)];