From 09ddad6c14db6e3310b663f6203582104d85db45 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 8 Jul 2019 15:28:51 -0700 Subject: [PATCH] s3: smbd: Remove ifdef'ed out dptr_close_oldest(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jul 10 00:28:51 UTC 2019 on sn-devel-184 --- source3/smbd/dir.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 62331da96e3..2c59cb898ec 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -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. ****************************************************************************/ -- 2.47.3