mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
afs/VNOPS: use osi_AllocSmallSpace() correctly
Send the size down to the allocator so it can perform some consistency checks. Change-Id: I6c089ab912014c639888b744a92a28813fb4b3c4 Reviewed-on: http://gerrit.openafs.org/11168 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: D Brashear <shadow@your-file-system.com>
This commit is contained in:
parent
3ab5463955
commit
2d973c10f1
@ -62,8 +62,8 @@ afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
|
||||
|
||||
AFS_STATCNT(afs_create);
|
||||
|
||||
OutFidStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutDirStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutFidStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
OutDirStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
|
||||
if ((code = afs_CreateReq(&treq, acred)))
|
||||
goto done2;
|
||||
|
@ -59,8 +59,8 @@ afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
|
||||
afs_Trace2(afs_iclSetp, CM_TRACE_MKDIR, ICL_TYPE_POINTER, adp,
|
||||
ICL_TYPE_STRING, aname);
|
||||
|
||||
OutFidStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutDirStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutFidStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
OutDirStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
|
||||
if ((code = afs_CreateReq(&treq, acred)))
|
||||
goto done2;
|
||||
|
@ -54,8 +54,8 @@ afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname,
|
||||
afs_Trace3(afs_iclSetp, CM_TRACE_LINK, ICL_TYPE_POINTER, adp,
|
||||
ICL_TYPE_POINTER, avc, ICL_TYPE_STRING, aname);
|
||||
|
||||
OutFidStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutDirStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutFidStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
OutDirStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
|
||||
/* create a hard link; new entry is aname in dir adp */
|
||||
if ((code = afs_CreateReq(&treq, acred)))
|
||||
|
@ -51,8 +51,8 @@ afsrename(struct vcache *aodp, char *aname1, struct vcache *andp,
|
||||
ICL_TYPE_STRING, aname1, ICL_TYPE_POINTER, andp,
|
||||
ICL_TYPE_STRING, aname2);
|
||||
|
||||
OutOldDirStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutNewDirStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutOldDirStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
OutNewDirStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
|
||||
if (strlen(aname1) > AFSNAMEMAX || strlen(aname2) > AFSNAMEMAX) {
|
||||
code = ENAMETOOLONG;
|
||||
|
@ -92,8 +92,8 @@ afs_symlink(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
|
||||
afs_Trace2(afs_iclSetp, CM_TRACE_SYMLINK, ICL_TYPE_POINTER, adp,
|
||||
ICL_TYPE_STRING, aname);
|
||||
|
||||
OutFidStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutDirStatus = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
|
||||
OutFidStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
OutDirStatus = osi_AllocSmallSpace(sizeof(struct AFSFetchStatus));
|
||||
|
||||
if ((code = afs_CreateReq(&treq, acred)))
|
||||
goto done2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user