Do not rely on vol header for V*VolumeHandles_r
authorAndrew Deason <adeason@sinenomine.net>
Thu, 18 Feb 2010 18:21:45 +0000 (12:21 -0600)
committerDerrick Brashear <shadow@dementia.org>
Tue, 9 Mar 2010 19:04:29 +0000 (11:04 -0800)
VCloseVolumeHandles_r and VReleaseVolumeHandles_r were using V_id to get
the id of the volume; just use vp->hashid so we can call these even if
we lack a header.

Change-Id: I0f0bc0ae82a7b86135aebe194c79a223a6f25094
Reviewed-on: http://gerrit.openafs.org/1348
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/vol/volume.c

index 94417ef..304e244 100644 (file)
@@ -3508,7 +3508,7 @@ VCloseVolumeHandles_r(Volume * vp)
      * DFlushVolume outside of vol_glock_mutex... 
      *
      * VCloseVnodeFiles_r drops the glock internally */
-    DFlushVolume(V_id(vp));
+    DFlushVolume(vp->hashid);
     VCloseVnodeFiles_r(vp);
 
 #ifdef AFS_DEMAND_ATTACH_FS
@@ -3552,7 +3552,7 @@ VReleaseVolumeHandles_r(Volume * vp)
 
     /* XXX need to investigate whether we can perform
      * DFlushVolume outside of vol_glock_mutex... */
-    DFlushVolume(V_id(vp));
+    DFlushVolume(vp->hashid);
 
     VReleaseVnodeFiles_r(vp); /* releases the glock internally */