Index: afs_vnop_lookup.c =================================================================== RCS file: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v retrieving revision 1.4 diff -u -r1.4 afs_vnop_lookup.c --- afs_vnop_lookup.c 2000/12/24 00:51:36 1.4 +++ afs_vnop_lookup.c 2001/02/21 04:21:13 @@ -182,7 +182,7 @@ } } - if (!tvp) return ENOENT; /* Couldn't find the volume */ + if (!tvp) return ENODEV; /* Couldn't find the volume */ /* Don't cross mountpoint from a BK to a BK volume */ if ((avc->states & CBackup) && (tvp->states & VBackup)) { @@ -198,7 +198,7 @@ tfid.Cell = tvp->cell; afs_PutVolume(tvp, WRITE_LOCK); /* release old volume */ tvp = afs_GetVolume(&tfid, areq, WRITE_LOCK); /* get the new one */ - if (!tvp) return ENOENT; /* oops, can't do it */ + if (!tvp) return ENODEV; /* oops, can't do it */ } if (avc->mvid == 0) @@ -1162,6 +1162,12 @@ ObtainWriteLock(&tvc->lock,133); code = EvalMountPoint(tvc, adp, &tvolp, &treq); ReleaseWriteLock(&tvc->lock); + + if (code) { + if (tvolp) afs_PutVolume(tvolp, WRITE_LOCK); + goto done; + } + /* next, we want to continue using the target of the mt point */ if (tvc->mvid && (tvc->states & CMValid)) { struct vcache *uvc;