From: Andrew Deason Date: Mon, 30 Sep 2013 22:53:36 +0000 (-0500) Subject: salvager: Fix in-memory invalid linktable counts X-Git-Tag: upstream/1.8.0_pre1^2~977 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6a4831e0e9a003bed06ac2269987c69090d3f7e7;p=packages%2Fo%2Fopenafs.git salvager: Fix in-memory invalid linktable counts When we have a nonexistant or invalid linktable, we manually set all of the linkcounts to 1, since we're recreating the link table from scratch. However, we also have a linkCount count in our in-memory allInodes array, which could be populated by garbage if we had a garbage linktable. So make sure to set our in-memory linkCount to 1 for each inode, so we don't use garbage linkcount data. Change-Id: I8f4873e12f70f81ee6f2c764957e77136b0a385e Reviewed-on: http://gerrit.openafs.org/10312 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 259bb44be..ae5e11780 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -1986,6 +1986,7 @@ DoSalvageVolumeGroup(struct SalvInfo *salvinfo, struct InodeSummary *isp, int nV ip = allInodes + isp[i].index; for (j = isp[i].nSpecialInodes; j < isp[i].nInodes; j++) { namei_SetLinkCount(fdP, ip[j].inodeNumber, 1, 1); + ip[j].linkCount = 1; } } }