summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-03-30 15:24:00 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-04-08 09:19:11 +0000
commit6bf07eb642cb82e0de5d96511b6fd13a8838d11d (patch)
tree59e42d66c3552321818d1aa7df87880140bb1fd0 /xlators/mgmt/glusterd/src/glusterd-utils.c
parent2a224653df93c4b3a6b3914509f314196ad61008 (diff)
glusterd:Change glusterd_list_add_order to add entry in ascending order
Change-Id: I0f82b1b5ad37e06135e9af33a4b5342ddde3ca94 BUG: 1207132 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/10046 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 59bfcdd535e..4863733f84c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -9549,11 +9549,11 @@ glusterd_list_add_order (struct cds_list_head *new, struct cds_list_head *head,
struct cds_list_head *pos = NULL;
cds_list_for_each_rcu (pos, head) {
- if (compare (new, pos) >= 0)
+ if (compare (new, pos) <= 0)
break;
}
- cds_list_add_rcu (new, pos);
+ cds_list_add_rcu (new, rcu_dereference (pos->prev));
}
void