Whamcloud - gitweb
LU-12236 gss: remove unused code in gss_svc_upcall.c 94/34794/4
authorAurelien Degremont <degremoa@amazon.com>
Thu, 2 May 2019 15:47:15 +0000 (15:47 +0000)
committerOleg Drokin <green@whamcloud.com>
Sat, 25 May 2019 05:02:44 +0000 (05:02 +0000)
Delete rsc_flush() related functions which are never
used.

Test-Parameters: envdefinitions=SHARED_KEY=true testlist=sanity,recovery-small,sanity-sec
Change-Id: Iedd6339b5fafdea81147c83e5f0499fa3ad60251
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-on: https://review.whamcloud.com/34794
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/gss/gss_svc_upcall.c

index 1789649..bc9f269 100644 (file)
@@ -720,85 +720,6 @@ static struct rsc *rsc_update(struct rsc *new, struct rsc *old)
  * rsc cache flush                      *
  ****************************************/
 
-typedef int rsc_entry_match(struct rsc *rscp, long data);
-
-static void rsc_flush(rsc_entry_match *match, long data)
-{
-#ifdef HAVE_CACHE_HEAD_HLIST
-       struct cache_head *ch = NULL;
-       struct hlist_head *head;
-#else
-       struct cache_head **ch;
-#endif
-        struct rsc *rscp;
-        int n;
-        ENTRY;
-
-       write_lock(&rsc_cache.hash_lock);
-        for (n = 0; n < RSC_HASHMAX; n++) {
-#ifdef HAVE_CACHE_HEAD_HLIST
-               head = &rsc_cache.hash_table[n];
-               hlist_for_each_entry(ch, head, cache_list) {
-                       rscp = container_of(ch, struct rsc, h);
-#else
-               for (ch = &rsc_cache.hash_table[n]; *ch;) {
-                       rscp = container_of(*ch, struct rsc, h);
-#endif
-
-                        if (!match(rscp, data)) {
-#ifndef HAVE_CACHE_HEAD_HLIST
-                               ch = &((*ch)->next);
-#endif
-                                continue;
-                        }
-
-                        /* it seems simply set NEGATIVE doesn't work */
-#ifdef HAVE_CACHE_HEAD_HLIST
-                       hlist_del_init(&ch->cache_list);
-#else
-                       *ch = (*ch)->next;
-                       rscp->h.next = NULL;
-#endif
-                        cache_get(&rscp->h);
-                       set_bit(CACHE_NEGATIVE, &rscp->h.flags);
-                        COMPAT_RSC_PUT(&rscp->h, &rsc_cache);
-                        rsc_cache.entries--;
-                }
-        }
-       write_unlock(&rsc_cache.hash_lock);
-        EXIT;
-}
-
-static int match_uid(struct rsc *rscp, long uid)
-{
-        if ((int) uid == -1)
-                return 1;
-        return ((int) rscp->ctx.gsc_uid == (int) uid);
-}
-
-static int match_target(struct rsc *rscp, long target)
-{
-        return (rscp->target == (struct obd_device *) target);
-}
-
-static inline void rsc_flush_uid(int uid)
-{
-        if (uid == -1)
-                CWARN("flush all gss contexts...\n");
-
-        rsc_flush(match_uid, (long) uid);
-}
-
-static inline void rsc_flush_target(struct obd_device *target)
-{
-        rsc_flush(match_target, (long) target);
-}
-
-void gss_secsvc_flush(struct obd_device *target)
-{
-        rsc_flush_target(target);
-}
-
 static struct rsc *gss_svc_searchbyctx(rawobj_t *handle)
 {
         struct rsc  rsci;