mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
more-mutex-20040406
Rodney found in his logs "Event Object Already Exists fid_t" messages. This lead to another location in the code where problem mutex usage was missing. In this case, multiple fid_t structs were created with the same fid number.
This commit is contained in:
parent
afb8a66540
commit
99c6354d4f
@ -973,6 +973,7 @@ smb_fid_t *smb_FindFID(smb_vc_t *vcp, unsigned short fid, int flags)
|
||||
smb_fid_t *fidp;
|
||||
int newFid;
|
||||
|
||||
lock_ObtainWrite(&smb_rctLock);
|
||||
/* figure out if we need to allocate a new file ID */
|
||||
if (fid == 0) {
|
||||
newFid = 1;
|
||||
@ -980,7 +981,6 @@ smb_fid_t *smb_FindFID(smb_vc_t *vcp, unsigned short fid, int flags)
|
||||
}
|
||||
else newFid = 0;
|
||||
|
||||
lock_ObtainWrite(&smb_rctLock);
|
||||
retry:
|
||||
for(fidp = vcp->fidsp; fidp; fidp = (smb_fid_t *) osi_QNext(&fidp->q)) {
|
||||
if (fid == fidp->fid) {
|
||||
@ -1010,7 +1010,8 @@ retry:
|
||||
afsi_log("Event Object Already Exists: %s", eventName);
|
||||
if (newFid) {
|
||||
vcp->fidCounter = fid+1;
|
||||
if (vcp->fidCounter == 0) vcp->fidCounter = 1;
|
||||
if (vcp->fidCounter == 0)
|
||||
vcp->fidCounter = 1;
|
||||
}
|
||||
}
|
||||
lock_ReleaseWrite(&smb_rctLock);
|
||||
|
Loading…
Reference in New Issue
Block a user