diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 00ec9c3d56..8bfb4c6b5e 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -6586,6 +6586,7 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid, FDH_SYNC(fdP); } if (errorCode) { + Error tmp_errorCode = 0; afs_sfsize_t nfSize = FDH_SIZE(fdP); osi_Assert(nfSize >= 0); /* something went wrong: adjust size and return */ @@ -6599,9 +6600,12 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid, if (origfdP) FDH_REALLYCLOSE(origfdP); FDH_CLOSE(fdP); /* set disk usage to be correct */ - VAdjustDiskUsage(&errorCode, volptr, + VAdjustDiskUsage(&tmp_errorCode, volptr, (afs_sfsize_t) (nBlocks(nfSize) - nBlocks(NewLength)), 0); + if (tmp_errorCode) { + errorCode = tmp_errorCode; + } return errorCode; } if (origfdP) { /* finish CopyOnWrite */