mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +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;
|
afs_size_t offset, len;
|
||||||
struct AFSFetchStatus OutFidStatus, OutDirStatus;
|
struct AFSFetchStatus OutFidStatus, OutDirStatus;
|
||||||
struct AFSVolSync tsync;
|
struct AFSVolSync tsync;
|
||||||
|
struct afs_fakestat_state vfakestate, dfakestate;
|
||||||
XSTATS_DECLS
|
XSTATS_DECLS
|
||||||
OSI_VC_CONVERT(adp)
|
OSI_VC_CONVERT(adp)
|
||||||
|
|
||||||
@ -66,6 +67,13 @@ afs_link(avc, OSI_VC_ARG(adp), aname, acred)
|
|||||||
if (code = afs_InitReq(&treq, acred))
|
if (code = afs_InitReq(&treq, acred))
|
||||||
goto done2;
|
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) {
|
if (avc->fid.Cell != adp->fid.Cell || avc->fid.Fid.Volume != adp->fid.Fid.Volume) {
|
||||||
code = EXDEV;
|
code = EXDEV;
|
||||||
goto done;
|
goto done;
|
||||||
@ -153,6 +161,8 @@ afs_link(avc, OSI_VC_ARG(adp), aname, acred)
|
|||||||
code = 0;
|
code = 0;
|
||||||
done:
|
done:
|
||||||
code = afs_CheckCode(code, &treq, 24);
|
code = afs_CheckCode(code, &treq, 24);
|
||||||
|
afs_PutFakeStat(&vfakestate);
|
||||||
|
afs_PutFakeStat(&dfakestate);
|
||||||
done2:
|
done2:
|
||||||
#ifdef AFS_OSF_ENV
|
#ifdef AFS_OSF_ENV
|
||||||
afs_PutVCache(adp, WRITE_LOCK);
|
afs_PutVCache(adp, WRITE_LOCK);
|
||||||
|
Loading…
Reference in New Issue
Block a user