mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
ocfs2: use find_last_bit()
We already have find_last_bit(). So just use it as described in the comment. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fae477b6f0
commit
518df6bdf3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user