summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/statcache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c
index cfc5286327..99f209006b 100644
--- a/source3/smbd/statcache.c
+++ b/source3/smbd/statcache.c
@@ -47,10 +47,15 @@ void stat_cache_add( const char *full_orig_name, const char *orig_translated_pat
TDB_DATA data_val;
char *original_path;
size_t original_path_length;
+ size_t sc_size = lp_max_stat_cache_size();
if (!lp_stat_cache())
return;
+ if (sc_size && (sc_size*1024 > tdb_stat_cache->map_size)) {
+ reset_stat_cache();
+ }
+
ZERO_STRUCT(data_val);
/*