From: Ben Kaduk Date: Tue, 26 Mar 2013 23:43:07 +0000 (-0400) Subject: Garbage-collect afs_GCUserData's argument X-Git-Tag: upstream/1.8.0_pre1^2~584 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a63a07c3357cc6f54ef129e0542ec531f2ce9433;p=packages%2Fo%2Fopenafs.git Garbage-collect afs_GCUserData's argument We no longer need the ability to force all rxnull connections to be reaped, as the epoch is set globally. Change the prototype and callers accordingly. Change-Id: I0815fdd035c3dd9d56f72e43603f9c53f5cec79d Reviewed-on: http://gerrit.openafs.org/10842 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c index fb7917028..538dd59d1 100644 --- a/src/afs/afs_daemons.c +++ b/src/afs/afs_daemons.c @@ -247,7 +247,7 @@ afs_Daemon(void) #endif /* else AFS_USERSPACE_IP_ADDR */ if (!afs_CheckServerDaemonStarted) afs_CheckServers(0, NULL); - afs_GCUserData(0); /* gc old conns */ + afs_GCUserData(); /* gc old conns */ /* This is probably the wrong way of doing GC for the various exporters but it will suffice for a while */ for (exporter = root_exported; exporter; exporter = exporter->exp_next) { diff --git a/src/afs/afs_pag_call.c b/src/afs/afs_pag_call.c index 609442864..ddc53b875 100644 --- a/src/afs/afs_pag_call.c +++ b/src/afs/afs_pag_call.c @@ -61,7 +61,7 @@ afs_Daemon(void) now = osi_Time(); if (last10MinCheck + 600 < now) { - afs_GCUserData(0); + afs_GCUserData(); } if (last60MinCheck + 3600 < now) { diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index 6e5187944..4495a914f 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -1002,7 +1002,7 @@ extern void afs_GCPAGs_perproc_func(afs_proc_t * pproc); #endif /* AFS_GCPAGS */ extern void afs_ComputePAGStats(void); extern void afs_PutUser(struct unixuser *au, afs_int32 locktype); -extern void afs_GCUserData(int aforce); +extern void afs_GCUserData(void); extern void afs_CheckTokenCache(void); extern void afs_ResetAccessCache(afs_int32 uid, afs_int32 cell, int alock); extern void afs_ResetUserConns(struct unixuser *auser); diff --git a/src/afs/afs_user.c b/src/afs/afs_user.c index 8c61861ad..e4a51962a 100644 --- a/src/afs/afs_user.c +++ b/src/afs/afs_user.c @@ -55,14 +55,10 @@ void afs_ResetAccessCache(afs_int32 uid, afs_int32 cell, int alock); /* Called from afs_Daemon to garbage collect unixusers no longer using system, - * and their conns. The aforce parameter tells the function to flush all - * *unauthenticated* conns, no matter what their expiration time; it exists - * because after we choose our final rx epoch, we want to stop using calls with - * other epochs as soon as possible (old file servers act bizarrely when they - * see epoch changes). + * and their conns. */ void -afs_GCUserData(int aforce) +afs_GCUserData(void) { struct unixuser *tu, **lu, *nu; int i; @@ -88,7 +84,7 @@ afs_GCUserData(int aforce) if (!afs_HasUsableTokens(tu->tokens, now)) delFlag = 1; } else { - if (aforce || (tu->tokenTime < now - NOTOKTIMEOUT)) + if (tu->tokenTime < now - NOTOKTIMEOUT) delFlag = 1; } }