diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/statcache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c index 8200c277b3..65a4830016 100644 --- a/source3/smbd/statcache.c +++ b/source3/smbd/statcache.c @@ -221,11 +221,11 @@ BOOL reset_stat_cache( void ) static BOOL initialised; if (!lp_stat_cache()) return True; - if (!initialised) { - initialised = True; - return hash_table_init( &stat_cache, INIT_STAT_CACHE_SIZE, (compare_function)(strcmp)); + if (initialised) { + hash_clear(&stat_cache); } - hash_clear(&stat_cache); - return hash_table_init( &stat_cache, INIT_STAT_CACHE_SIZE, (compare_function)(strcmp)); + initialised = hash_table_init( &stat_cache, INIT_STAT_CACHE_SIZE, + (compare_function)(strcmp)); + return initialised; } /* reset_stat_cache */ |