DEVEL15-windows-access-fetchstatus-20060526

Do not call cm_GetCallback() directly.  Always
use cm_SyncOp(CM_SCACHESYNC_NEEDCALLBACK)


(cherry picked from commit 40415fe265d8e660f3698d8ab7f93004d589f902)
This commit is contained in:
Jeffrey Altman 2006-06-01 16:40:32 +00:00 committed by Derrick Brashear
parent 39b4525648
commit 4af126ec26

View File

@ -127,8 +127,8 @@ long cm_GetAccessRights(struct cm_scache *scp, struct cm_user *up,
/* first, start by finding out whether we have a directory or something
* else, so we can find what object's ACL we need.
*/
code = cm_SyncOp(scp, NULL, up, reqp, 0, CM_SCACHESYNC_GETSTATUS
| CM_SCACHESYNC_NEEDCALLBACK);
code = cm_SyncOp(scp, NULL, up, reqp, 0,
CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
if (code)
return code;
@ -145,14 +145,13 @@ long cm_GetAccessRights(struct cm_scache *scp, struct cm_user *up,
return code;
}
osi_Log1(afsd_logp, "GetAccess parent %x", aclScp);
osi_Log1(afsd_logp, "GetAccess parent scp %x user %x", aclScp, up);
lock_ObtainMutex(&aclScp->mx);
code = cm_GetCallback(aclScp, up, reqp, 1);
code = cm_SyncOp(aclScp, NULL, up, reqp, 0,
CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
lock_ReleaseMutex(&aclScp->mx);
cm_ReleaseSCache(aclScp);
lock_ObtainMutex(&scp->mx);
} else {
code = cm_GetCallback(scp, up, reqp, 1);
}
return code;