diff --git a/src/afs/VNOPS/afs_vnop_link.c b/src/afs/VNOPS/afs_vnop_link.c index 10dd9867fa..2cd2c96917 100644 --- a/src/afs/VNOPS/afs_vnop_link.c +++ b/src/afs/VNOPS/afs_vnop_link.c @@ -56,6 +56,7 @@ afs_link(avc, OSI_VC_ARG(adp), aname, acred) afs_size_t offset, len; struct AFSFetchStatus OutFidStatus, OutDirStatus; struct AFSVolSync tsync; + struct afs_fakestat_state vfakestate, dfakestate; XSTATS_DECLS OSI_VC_CONVERT(adp) @@ -66,6 +67,13 @@ afs_link(avc, OSI_VC_ARG(adp), aname, acred) if (code = afs_InitReq(&treq, acred)) goto done2; + afs_InitFakeStat(&vfakestate); + afs_InitFakeStat(&dfakestate); + code = afs_EvalFakeStat(&avc, &vfakestate, &treq); + if (code) goto done; + code = afs_EvalFakeStat(&adp, &dfakestate, &treq); + if (code) goto done; + if (avc->fid.Cell != adp->fid.Cell || avc->fid.Fid.Volume != adp->fid.Fid.Volume) { code = EXDEV; goto done; @@ -153,6 +161,8 @@ afs_link(avc, OSI_VC_ARG(adp), aname, acred) code = 0; done: code = afs_CheckCode(code, &treq, 24); + afs_PutFakeStat(&vfakestate); + afs_PutFakeStat(&dfakestate); done2: #ifdef AFS_OSF_ENV afs_PutVCache(adp, WRITE_LOCK);