]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afs/VNOPS: use osi_AllocSmallSpace() correctly
authorChas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Fri, 23 May 2014 11:48:11 +0000 (07:48 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 23 Jul 2014 14:08:13 +0000 (10:08 -0400)
Send the size down to the allocator so it can perform some
consistency checks.

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>
(cherry picked from commit 2d973c10f13b40c0ac9da25fe7f4c73b3560a686)

Change-Id: I38d16bdd014010a2ccc9636b890c9ea7a6158e6a
Reviewed-on: http://gerrit.openafs.org/11203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/VNOPS/afs_vnop_create.c
src/afs/VNOPS/afs_vnop_dirops.c
src/afs/VNOPS/afs_vnop_link.c
src/afs/VNOPS/afs_vnop_rename.c
src/afs/VNOPS/afs_vnop_symlink.c

index 145ae926c31dc3901c4bcdf92fabaed9d80975fd..a3d612862d971b96b3302b10da07a5529ba2012a 100644 (file)
@@ -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_InitReq(&treq, acred)))
        goto done2;
index 84da54baa8e2e9c234cb797399e2f3f338bef57b..e284222cdb61d127d716173564952b11e34a394d 100644 (file)
@@ -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_InitReq(&treq, acred)))
        goto done2;
index 345799857346f61f9fbc5e945998cd01eeb715f1..9a62ccc36e174e722a5a82690ace34461a4e8846 100644 (file)
@@ -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_InitReq(&treq, acred)))
index 893fc847362cda441d1e283aff94487b51b63dd2..8dbc70e3e02a879bdc05e530f6f2617a96afbfa8 100644 (file)
@@ -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;
index 4e0b406a0057698d6ad22b658e42c3e9966938b6..e83b420851bbc791718da9b50d5b88ea691d75d6 100644 (file)
@@ -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_InitReq(&treq, acred)))
        goto done2;