X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2Fafs_fetchstore.c;h=ed25a4d774f84dcdfe5ab5ede15e66220cd09c58;hp=eb32bbe33b669e72030f8f6476b46678363bbe9e;hb=ce327b568f4ff522aa008f235d97e0d9144eb92c;hpb=21ad6a0c826c150c4227ece50554101641ab4626 diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index eb32bbe..ed25a4d 100644 --- a/src/afs/afs_fetchstore.c +++ b/src/afs/afs_fetchstore.c @@ -1150,11 +1150,15 @@ afs_CacheFetchProc(struct afs_conn *tc, struct rx_connection *rxconn, adc->validPos = base; - if ( !code ) do { + if (code) { + goto done; + } + + do { if (avc->f.states & CForeign) { code = (*ops->more)(rock, &length, &moredata); if ( code ) - break; + goto done; } #ifndef AFS_NOSTATS bytesToXfer += length; @@ -1177,11 +1181,11 @@ afs_CacheFetchProc(struct afs_conn *tc, struct rx_connection *rxconn, ICL_TYPE_POINTER, avc, ICL_TYPE_INT32, code, ICL_TYPE_INT32, length); code = -34; - break; + goto done; } code = (*ops->write)(rock, fP, offset, bytesread, &byteswritten); if ( code ) - break; + goto done; offset += bytesread; base += bytesread; length -= bytesread; @@ -1194,6 +1198,7 @@ afs_CacheFetchProc(struct afs_conn *tc, struct rx_connection *rxconn, } code = 0; } while (moredata); + done: if (!code) code = (*ops->close)(rock, avc, adc, tsmall); if (ops)