Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40092
b: refs/heads/master
c: 79cd22d
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and Mark Fasheh committed Oct 20, 2006
1 parent 4ec1360 commit 4bc52b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1877fb2967ec8c0c6e946cc24c253bb52ce4d06
refs/heads/master: 79cd22d3ac921b9209bf813c7e75e6b69e74896c
10 changes: 6 additions & 4 deletions trunk/fs/ocfs2/cluster/nodemanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,16 @@ static struct o2nm_node *o2nm_node_ip_tree_lookup(struct o2nm_cluster *cluster,
struct o2nm_node *node, *ret = NULL;

while (*p) {
int cmp;

parent = *p;
node = rb_entry(parent, struct o2nm_node, nd_ip_node);

if (memcmp(&ip_needle, &node->nd_ipv4_address,
sizeof(ip_needle)) < 0)
cmp = memcmp(&ip_needle, &node->nd_ipv4_address,
sizeof(ip_needle));
if (cmp < 0)
p = &(*p)->rb_left;
else if (memcmp(&ip_needle, &node->nd_ipv4_address,
sizeof(ip_needle)) > 0)
else if (cmp > 0)
p = &(*p)->rb_right;
else {
ret = node;
Expand Down

0 comments on commit 4bc52b7

Please sign in to comment.