VOL_LOCK needed when traversing DiskPartitionList
[openafs.git] / src / volser / volprocs.c
index 87ead74..8de0c41 100644 (file)
@@ -134,7 +134,7 @@ static afs_int32 VolSetDate(struct rx_call *, afs_int32, afs_int32);
 
 /* this call unlocks all of the partition locks we've set */
 int 
-VPFullUnlock(void)
+VPFullUnlock_r(void)
 {
     register struct DiskPartition64 *tp;
     for (tp = DiskPartitionList; tp; tp = tp->next) {
@@ -146,6 +146,16 @@ VPFullUnlock(void)
     return 0;
 }
 
+int
+VPFullUnlock(void)
+{
+    int code;
+    VOL_LOCK;
+    code = VPFullUnlock_r();
+    VOL_UNLOCK;
+    return code;
+}
+
 /* get partition id from a name */
 afs_int32
 PartitionID(char *aname)
@@ -2774,9 +2784,7 @@ VolMonitor(struct rx_call *acid, transDebugEntries *transInfo)
     if (allTrans == (struct volser_trans *)0)
        goto done;              /*no active transactions */
     for (tt = allTrans; tt; tt = nt) { /*copy relevant info into pntr */
-        THOLD(tt);  /* do not delete tt while copying info */
        nt = tt->next;
-        VTRANS_UNLOCK;
         VTRANS_OBJ_LOCK(tt);
        pntr->tid = tt->tid;
        pntr->time = tt->time;
@@ -2813,8 +2821,6 @@ VolMonitor(struct rx_call *acid, transDebugEntries *transInfo)
            /*set pntr to right position */
        }
 
-        TRELE(tt);
-        VTRANS_LOCK;
     }
 done:
     VTRANS_UNLOCK;