From 7eb63e30f22f7a9d785f6620be22d2b3aab77ada Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Wed, 22 Apr 2009 12:55:47 +0530 Subject: iobuf_pool->arenas_cnt should be incremented in iobuf_arena_alloc, and not iobuf_pool_add_arena (to avoid counting of unpruned arenas) Signed-off-by: Anand V. Avati --- libglusterfs/src/iobuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index 7cbc1702e7e..6d6fca13388 100644 --- a/libglusterfs/src/iobuf.c +++ b/libglusterfs/src/iobuf.c @@ -135,6 +135,8 @@ __iobuf_arena_alloc (struct iobuf_pool *iobuf_pool) if (!iobuf_arena->iobufs) goto err; + iobuf_pool->arena_cnt++; + return iobuf_arena; err: @@ -173,7 +175,6 @@ __iobuf_pool_add_arena (struct iobuf_pool *iobuf_pool) return NULL; list_add_tail (&iobuf_arena->list, &iobuf_pool->arenas.list); - iobuf_pool->arena_cnt++; return iobuf_arena; } -- cgit