[sheepdog] [PATCH v2 4/5] util/sd_inode: kill icache_init()

Liu Yuan namei.unix at gmail.com
Fri Feb 21 07:33:40 CET 2014


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 lib/sd_inode.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/sd_inode.c b/lib/sd_inode.c
index 4bc5eaa..444e3d7 100644
--- a/lib/sd_inode.c
+++ b/lib/sd_inode.c
@@ -224,11 +224,6 @@ struct inode_cache {
 } cache_array[NUMBER_OF_CACHE];
 static int cache_idx;
 
-static void icache_init(void)
-{
-	cache_idx = 0;
-}
-
 static void icache_writeout(int copies, int policy)
 {
 	int i;
@@ -242,7 +237,7 @@ static void icache_writeout(int copies, int policy)
 static void icache_release(int copies, int policy)
 {
 	icache_writeout(copies, policy);
-	icache_init();
+	cache_idx = 0; /* reset icache */
 }
 
 static void icache_insert(int copies, int policy,
-- 
1.8.1.2




More information about the sheepdog mailing list