summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAnand V. Avati <avati@gluster.com>2009-04-13 14:03:21 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-13 14:55:22 +0530
commitb9a210a419ff28f2d75b10a680520fd6cc37ac5a (patch)
treee40210d63808f895bd0d5df8cc747bff7408b127 /libglusterfs
parent688db6452befde5d7cd2b35f86b770b4c19c53fc (diff)
bug fix in iobuf_select_arena - never created a new arena
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/iobuf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index 7da029bd1a0..a233387fcfe 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -245,11 +245,14 @@ struct iobuf_arena *
__iobuf_select_arena (struct iobuf_pool *iobuf_pool)
{
struct iobuf_arena *iobuf_arena = NULL;
+ struct iobuf_arena *trav = NULL;
/* look for unused iobuf from the head-most arena */
- list_for_each_entry (iobuf_arena, &iobuf_pool->arenas.list, list) {
- if (iobuf_arena->passive_cnt)
+ list_for_each_entry (trav, &iobuf_pool->arenas.list, list) {
+ if (trav->passive_cnt) {
+ iobuf_arena = trav;
break;
+ }
}
if (!iobuf_arena) {