diff --git a/src/afs/afs_osi_pag.c b/src/afs/afs_osi_pag.c index 80b0cc3217..ec0a0dd435 100644 --- a/src/afs/afs_osi_pag.c +++ b/src/afs/afs_osi_pag.c @@ -185,6 +185,11 @@ afs_pag_wait(afs_ucred_t *acred) afs_int32 afs_genpag(afs_ucred_t *acred, afs_uint32 *apag) { + afs_int32 code; + code = afs_pag_wait(acred); + if (code) { + return code; + } *apag = genpagval(); return 0; } @@ -221,11 +226,6 @@ afs_setpag(void) AFS_STATCNT(afs_setpag); - code = afs_pag_wait(acred); - if (code) { - goto done; - } - code = afs_genpag(acred, &pag); if (code) { goto done;