]> Pileus Git - ~andy/linux/blobdiff - fs/ocfs2/cluster/heartbeat.c
ocfs2: use find_last_bit()
[~andy/linux] / fs / ocfs2 / cluster / heartbeat.c
index 292a13b05b6e4345e6c950808027b38e9956f6df..73920ffda05b331c85ef1760d97083d1590a4a16 100644 (file)
@@ -946,23 +946,9 @@ out:
        return changed;
 }
 
-/* This could be faster if we just implmented a find_last_bit, but I
- * don't think the circumstances warrant it. */
-static int o2hb_highest_node(unsigned long *nodes,
-                            int numbits)
+static int o2hb_highest_node(unsigned long *nodes, int numbits)
 {
-       int highest, node;
-
-       highest = numbits;
-       node = -1;
-       while ((node = find_next_bit(nodes, numbits, node + 1)) != -1) {
-               if (node >= numbits)
-                       break;
-
-               highest = node;
-       }
-
-       return highest;
+       return find_last_bit(nodes, numbits);
 }
 
 static int o2hb_do_disk_heartbeat(struct o2hb_region *reg)