remove-vnop-dont-unmount-fix-20040325
authorNickolai Zeldovich <kolya@mit.edu>
Thu, 25 Mar 2004 22:52:15 +0000 (22:52 +0000)
committerNickolai Zeldovich <kolya@mit.edu>
Thu, 25 Mar 2004 22:52:15 +0000 (22:52 +0000)
Make remove-vnop-denies-unlink-on-mtpt-20040325 more likely to work,
and don't forget to afs_PutFakeStat() while we're at it.  After we
call afs_EvalFakeStat(), there's no way that mvstat can be 1 -- either
the object wasn't a mountpoint and it'll be mvstat 0, or EvalFakeStat
will evaluate it and it'll be mvstat 2.

src/afs/VNOPS/afs_vnop_remove.c

index 9c52ad4..6bdb9f3 100644 (file)
@@ -280,7 +280,8 @@ OSI_VC_DECL(adp);
        return code;
     }
 
-    if (adp->mvstat == 1) {
+    if (adp->mvstat == 2) {
+       afs_PutFakeStat(&fakestate);
 #ifdef  AFS_OSF_ENV
         afs_PutVCache(adp);
        afs_PutVCache(tvc);