afs: Clarify vcache->mvid accesses
[openafs.git] / src / afs / VNOPS / afs_vnop_remove.c
index 70d6c1a..b5f53b4 100644 (file)
@@ -126,10 +126,6 @@ afsremove(struct vcache *adp, struct dcache *tdc,
     if (tvc) {
        if (afs_mariner)
            afs_MarinerLog("store$Removing", tvc);
-#ifdef AFS_BOZONLOCK_ENV
-       afs_BozonLock(&tvc->pvnLock, tvc);
-       /* Since afs_TryToSmush will do a pvn_vptrunc */
-#endif
        ObtainWriteLock(&tvc->lock, 141);
        /* note that callback will be broken on the deleted file if there are
         * still >0 links left to it, so we'll get the stat right */
@@ -140,9 +136,6 @@ afsremove(struct vcache *adp, struct dcache *tdc,
                afs_TryToSmush(tvc, acred, 0);
        }
        ReleaseWriteLock(&tvc->lock);
-#ifdef AFS_BOZONLOCK_ENV
-       afs_BozonUnlock(&tvc->pvnLock, tvc);
-#endif
        afs_PutVCache(tvc);
     }
     return (0);
@@ -353,10 +346,10 @@ afs_remove(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred)
        code = afsrename(adp, aname, adp, unlname, acred, treq);
        Tnam1 = unlname;
        if (!code) {
-           struct VenusFid *oldmvid = NULL;
-           if (tvc->mvid) 
-               oldmvid = tvc->mvid;
-           tvc->mvid = (struct VenusFid *)unlname;
+           void *oldmvid = NULL;
+           if (tvc->mvid.silly_name)
+               oldmvid = tvc->mvid.silly_name;
+           tvc->mvid.silly_name = unlname;
            if (oldmvid)
                osi_FreeSmallSpace(oldmvid);
            crhold(acred);
@@ -417,7 +410,7 @@ afs_remunlink(struct vcache *avc, int doit)
     }
 #endif
 
-    if (avc->mvid && (doit || (avc->f.states & CUnlinkedDel))) {
+    if (avc->mvid.silly_name && (doit || (avc->f.states & CUnlinkedDel))) {
        struct vrequest *treq = NULL;
 
        if ((code = afs_CreateReq(&treq, avc->uncred))) {
@@ -426,8 +419,8 @@ afs_remunlink(struct vcache *avc, int doit)
            /* Must bump the refCount because GetVCache may block.
             * Also clear mvid so no other thread comes here if we block.
             */
-           unlname = (char *)avc->mvid;
-           avc->mvid = NULL;
+           unlname = avc->mvid.silly_name;
+           avc->mvid.silly_name = NULL;
            cred = avc->uncred;
            avc->uncred = NULL;