From 219ab91243b8c9c5ffbfa459047968145debee9c Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 27 Jul 2010 16:22:47 -0500 Subject: [PATCH] salvage: update inodes array after CopyAndSalvage CopyAndSalvage makes a copy of the directory to salvage it. So, the new directory will have a new inode. Update the array of directory inodes to reflect this. Without this, we can fail to alter the copied/salvaged directory later on, since we will try to read/write to the wrong inode. Change-Id: I2466981e8ee54c5aecf1a166a37d8146b126de24 Reviewed-on: http://gerrit.openafs.org/2530 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/vol/vol-salvage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 55bd2402f..c4ace1d50 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -3329,6 +3329,7 @@ SalvageDir(char *name, VolumeId rwVid, struct VnodeInfo *dirVnodeInfo, if (!Testing) { CopyAndSalvage(&dir); dirok = 1; + dirVnodeInfo->inodes[i] = dir.dirHandle.dirh_inode; } } dirHandle = dir.dirHandle; -- 2.39.5