From 10b4ecb85c5009c6c7b9422bd5299ba43d8448a1 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Thu, 5 Mar 2015 18:19:30 +0530 Subject: iobuf: Do not call __iobuf_ref directly iobuf_get will be creating the iobuf and hence lock is not necessary to increment ref. However, it is a good practice to call iobuf_ref instead of __iobuf_ref so that we have a single point to get refs and this can be used later to do mem accounting etc. Change-Id: I1fd328c3c463c23fd5f6df505ccb5c86f6207f28 BUG: 1199075 Signed-off-by: Raghavendra Talur Reviewed-on: http://review.gluster.org/9812 Reviewed-by: Niels de Vos Tested-by: Gluster Build System --- libglusterfs/src/iobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libglusterfs/src') diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index c414d728037..9dbf19b71d7 100644 --- a/libglusterfs/src/iobuf.c +++ b/libglusterfs/src/iobuf.c @@ -665,7 +665,7 @@ iobuf_get2 (struct iobuf_pool *iobuf_pool, size_t page_size) if (!iobuf) goto unlock; - __iobuf_ref (iobuf); + iobuf_ref (iobuf); } unlock: pthread_mutex_unlock (&iobuf_pool->mutex); @@ -698,7 +698,7 @@ iobuf_get (struct iobuf_pool *iobuf_pool) goto unlock; } - __iobuf_ref (iobuf); + iobuf_ref (iobuf); } unlock: pthread_mutex_unlock (&iobuf_pool->mutex); -- cgit