1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-29 02:50:28 +03:00

smbd: Flush dfree memcache on service reload

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13446

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Christof Schmitt 2018-05-18 20:51:58 -07:00 committed by Jeremy Allison
parent 8f121747b0
commit e30d0c0e0d
3 changed files with 7 additions and 0 deletions

View File

@ -273,3 +273,8 @@ out:
TALLOC_FREE(to_free);
return dfree_ret;
}
void flush_dfree_cache(void)
{
memcache_flush(smbd_memcache(), DFREE_CACHE);
}

View File

@ -173,6 +173,7 @@ uint64_t sys_disk_free(connection_struct *conn, struct smb_filename *fname,
uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
uint64_t get_dfree_info(connection_struct *conn, struct smb_filename *fname,
uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
void flush_dfree_cache(void);
/* The following definitions come from smbd/dir.c */

View File

@ -164,6 +164,7 @@ bool reload_services(struct smbd_server_connection *sconn,
mangle_reset_cache();
reset_stat_cache();
flush_dfree_cache();
/* this forces service parameters to be flushed */
set_current_service(NULL,0,True);