From: Michael Meffie Date: Sat, 7 Sep 2013 03:58:39 +0000 (-0400) Subject: auth: fix cellservdb update check X-Git-Tag: upstream/1.8.0_pre1^2~1013 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=73ae85bd59cfe9fca2daeb7dc0aa0917368bb5bf;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 0e3bfa033ed230fcb46ad8e3c26c8b7aae6e00af Change-Id: I209e93a1bc4107a878eefaae92ec0e5e4ada2518 Reviewed-on: http://gerrit.openafs.org/10230 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear --- diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index cffac984f..14c03b436 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -353,7 +353,7 @@ _afsconf_UpToDate(struct afsconf_dir *adir) int code; time_t now = time(0); - if (adir->timeCheck == now) { + if (adir->timeRead && (adir->timeCheck == now)) { return 1; /* stat no more than once a second */ } adir->timeCheck = now;