From: Jeremy Allison Date: Mon, 8 Jul 2019 22:35:20 +0000 (-0700) Subject: s3: smbd: Remove unused dptr_idleoldest() and dptr_idle() functions. X-Git-Tag: talloc-2.3.0~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=288d71678b02effdb910e8ebb811d0f502a75166;p=thirdparty%2Fsamba.git s3: smbd: Remove unused dptr_idleoldest() and dptr_idle() functions. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider --- diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index b53f0dc6c2e..b6b7f40bb81 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -107,52 +107,6 @@ bool init_dptrs(struct smbd_server_connection *sconn) return true; } -#if 0 -/**************************************************************************** - Idle a dptr - the directory is closed but the control info is kept. -****************************************************************************/ - -static void dptr_idle(struct dptr_struct *dptr) -{ - if (dptr->dir_hnd) { - DEBUG(4,("Idling dptr dnum %d\n",dptr->dnum)); - TALLOC_FREE(dptr->dir_hnd); - TALLOC_FREE(dptr->dptr_cache); - dptr->counter = 0; - } -} - -/**************************************************************************** - Idle the oldest dptr. -****************************************************************************/ - -static void dptr_idleoldest(struct smbd_server_connection *sconn) -{ - struct dptr_struct *dptr; - - /* - * Go to the end of the list. - */ - dptr = DLIST_TAIL(sconn->searches.dirptrs); - - if(!dptr) { - DEBUG(0,("No dptrs available to idle ?\n")); - return; - } - - /* - * Idle the oldest pointer. - */ - - for(; dptr; dptr = DLIST_PREV(dptr)) { - if (dptr->dir_hnd) { - dptr_idle(dptr); - return; - } - } -} -#endif - /**************************************************************************** Get the struct dptr_struct for a dir index. ****************************************************************************/