]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove unused dptr_idleoldest() and dptr_idle() functions.
authorJeremy Allison <jra@samba.org>
Mon, 8 Jul 2019 22:35:20 +0000 (15:35 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 9 Jul 2019 23:12:16 +0000 (23:12 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/smbd/dir.c

index b53f0dc6c2e59b787e9f99cc29c143eae0704f28..b6b7f40bb812d4d7d43d53c9e935f49709607bd0 100644 (file)
@@ -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.
 ****************************************************************************/