]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove ifdef'ed out dptr_close_oldest().
authorJeremy Allison <jra@samba.org>
Mon, 8 Jul 2019 22:28:51 +0000 (15:28 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 10 Jul 2019 00:28:51 +0000 (00:28 +0000)
No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 10 00:28:51 UTC 2019 on sn-devel-184

source3/smbd/dir.c

index 62331da96e396fb2917b6b039ab15a80048d356b..2c59cb898ec064142c28be82d96efbdf721447d5 100644 (file)
@@ -288,45 +288,6 @@ void dptr_closepath(struct smbd_server_connection *sconn,
        }
 }
 
-#if 0
-/****************************************************************************
- Try and close the oldest handle not marked for
- expect close in the hope that the client has
- finished with that one.
-****************************************************************************/
-
-static void dptr_close_oldest(struct smbd_server_connection *sconn,
-                             bool old)
-{
-       struct dptr_struct *dptr;
-
-       /*
-        * Go to the end of the list.
-        */
-       for(dptr = sconn->searches.dirptrs; dptr && dptr->next; dptr = dptr->next)
-               ;
-
-       if(!dptr) {
-               DEBUG(0,("No old dptrs available to close oldest ?\n"));
-               return;
-       }
-
-       /*
-        * If 'old' is true, close the oldest oldhandle dnum (ie. 1 < dnum < 256) that
-        * does not have expect_close set. If 'old' is false, close
-        * one of the new dnum handles.
-        */
-
-       for(; dptr; dptr = DLIST_PREV(dptr)) {
-               if ((old && (dptr->dnum < 256) && !dptr->expect_close) ||
-                       (!old && (dptr->dnum > 255))) {
-                               dptr_close_internal(dptr);
-                               return;
-               }
-       }
-}
-#endif
-
 /****************************************************************************
  Safely do an OpenDir as root, ensuring we're in the right place.
 ****************************************************************************/