mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 00:41:08 +00:00
Support afs_link() in volume roots when using fakestat.
This commit is contained in:
parent
4b2be9588b
commit
59741a821c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user