From: Michael Meffie Date: Thu, 12 Sep 2013 16:20:33 +0000 (-0400) Subject: auth: fix cellservdb update check X-Git-Tag: upstream/1.6.6_pre2^2~65 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0f795f08158ca65242b943ff89525e6901970bec;p=packages%2Fo%2Fopenafs.git auth: fix cellservdb update check Fix a bug introduced by the check to avoid excessive stats of the cellservdb. Fixes a bug where cached cell config data is served for up to one second after a write. Check the timeRead field which is reset after a write to indicate the data should be read. Fixes commit 5cdc211b8bf1b3f5419ebe52ecc9d3772ffdf9a6 on the 1.6.x branch. Reviewed-on: http://gerrit.openafs.org/10230 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 73ae85bd59cfe9fca2daeb7dc0aa0917368bb5bf) Change-Id: I01c09383b0ba417aca13b2ef7724d4fde91e327a Reviewed-on: http://gerrit.openafs.org/10247 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand --- diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index 50de1084a..b00d3191e 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -349,7 +349,7 @@ afsconf_Check(struct afsconf_dir *adir) afs_int32 code; time_t now = time(0); - if (adir->timeCheck == now) { + if (adir->timeRead && (adir->timeCheck == now)) { return 0; /* stat no more than once a second */ } adir->timeCheck = now;