From: Andrew Deason Date: Thu, 14 Nov 2013 18:53:40 +0000 (-0600) Subject: afs: Don't clear afs_CacheTooFull prematurely X-Git-Tag: openafs-stable-1_8_0pre1~849 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=71ec4a3e3d887efd56be7bf712c0fd5da2f92083 afs: Don't clear afs_CacheTooFull prematurely Currently, we can clear afs_CacheTooFull here, even if afs_CacheIsTooFull() doesn't agree that the cache is no longer 'too full'. This could theoretically result in afs_CacheTooFull being cleared, even though the cache is indeed 'too full', according to afs_CacheIsTooFull(). Just break here, and let afs_CacheIsTooFull() decide. This reverts a small part of 488c7c97854a4bd0ec67bcfe17df93b3fd025f88. This part doesn't seem important to the functionality in that commit, though; the rest of that commit is still here, and avoids the extra work if we have calculated no needed space to free. Change-Id: If0adce7fa2e88a970ddb202de02c8ff048d2ad15 Reviewed-on: http://gerrit.openafs.org/10460 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 872757a..06ab7ad 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -452,7 +452,6 @@ afs_CacheTruncateDaemon(void) if (slots_needed || space_needed) afs_GetDownD(slots_needed, &space_needed, 0); if ((space_needed <= 0) && (slots_needed <= 0)) { - afs_CacheTooFull = 0; break; } if (afs_termState == AFSOP_STOP_TRUNCDAEMON)