cachemgr store file too big error exit via usual path
[openafs.git] / src / afs / afs_segments.c
index 18b63c1..db18055 100644 (file)
@@ -42,7 +42,7 @@ afs_StoreMini(register struct vcache *avc, struct vrequest *areq)
     struct AFSStoreStatus InStatus;
     struct AFSFetchStatus OutStatus;
     struct AFSVolSync tsync;
-    register afs_int32 code, code2;
+    register afs_int32 code;
     register struct rx_call *tcall;
     afs_size_t tlen, xlen = 0;
     XSTATS_DECLS;
@@ -94,8 +94,10 @@ afs_StoreMini(register struct vcache *avc, struct vrequest *areq)
                l2 = tlen;
                if ((avc->f.m.Length > 0x7fffffff) ||
                    (tlen > 0x7fffffff) ||
-                   ((0x7fffffff - tlen) < avc->f.m.Length))
-                   return EFBIG;
+                   ((0x7fffffff - tlen) < avc->f.m.Length)) {
+                   code = EFBIG;
+                   goto error;
+               }
                code =
                    StartRXAFS_StoreData(tcall,
                                         (struct AFSFid *)&avc->f.fid.Fid,
@@ -109,9 +111,10 @@ afs_StoreMini(register struct vcache *avc, struct vrequest *areq)
            if (code == 0) {
                code = EndRXAFS_StoreData(tcall, &OutStatus, &tsync);
            }
-           code2 = rx_EndCall(tcall, code);
-           if (code2 && !code)
-               code = code2;
+#ifdef AFS_64BIT_CLIENT
+       error:
+#endif
+           code = rx_EndCall(tcall, code);
            RX_AFS_GLOCK();
            XSTATS_END_TIME;
 #ifdef AFS_64BIT_CLIENT
@@ -579,7 +582,8 @@ afs_InvalidateAllSegments(struct vcache *avc)
  * \note avc must be write locked. May release and reobtain avc and GLOCK
  */
 int
-afs_ExtendSegments(struct vcache *avc, afs_size_t alen, struct vrequest *areq) {
+afs_ExtendSegments(struct vcache *avc, afs_size_t alen, struct vrequest *areq)
+{
     afs_size_t offset, toAdd;
     struct osi_file *tfile;
     afs_int32 code = 0;