From f2ec10782384469f276195457b13c139e4fd2cee Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 31 Mar 2011 12:51:44 -0500 Subject: [PATCH] salvager: Do not AskDelete on GetInodeSummary fail GetInodeSummary can fail due to a number of different reasons, not just because the VG doesn't exist. If, for example, we just fail to write the temporary inode file, we will return with an error, but we should not AskDelete the volume in that instance. GetInodeSummary already has code to delete the volumes in question when no inodes are found, so remove the extra AskDelete after GetInodeSummary returns. Change-Id: I5df7a3ffed962b62409adbedfa1c1a0445dad2f8 Reviewed-on: http://gerrit.openafs.org/4438 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/vol/vol-salvage.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index cdfded23d..53dc826b3 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -831,11 +831,6 @@ SalvageFileSys1(struct DiskPartition64 *partP, VolumeId singleVolumeNumber) if (GetInodeSummary(salvinfo, inodeFile, singleVolumeNumber) < 0) { OS_CLOSE(inodeFile); - if (singleVolumeNumber) { - /* the volume group -- let alone the volume -- does not exist, - * but we checked it out, so give it back to the fileserver */ - AskDelete(salvinfo, singleVolumeNumber); - } return; } salvinfo->inodeFd = inodeFile; -- 2.39.5