Normalize on vp->hashid for hash table usage
authorBenjamin Kaduk <kaduk@mit.edu>
Mon, 12 Jan 2015 20:14:48 +0000 (15:14 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 22 Aug 2015 16:42:38 +0000 (12:42 -0400)
At present the hashid is set to the same value as the volume ID
(i.e., V_id(vp) a.k.a. vp->header->diskstuff.id), but we should
not leak across the abstraction barrier without cause.

Change-Id: I6a727e60c34bdc938f4ae2e815c7513802a4dbc9
Reviewed-on: http://gerrit.openafs.org/11664
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/vol/volume.c

index a7c5d75..49793a6 100644 (file)
@@ -3490,7 +3490,7 @@ attach2(Error * ec, VolumeId volumeId, char *path, struct DiskPartition64 *partp
        V_checkoutMode(vp) = mode;
     }
 
-    AddVolumeToHashTable(vp, V_id(vp));
+    AddVolumeToHashTable(vp, vp->hashid);
 #ifdef AFS_DEMAND_ATTACH_FS
     if (VCanUnlockAttached() && (V_attachFlags(vp) & VOL_LOCKED)) {
        VUnlockVolume(vp);