be consistent in the order we hold H_LOCK and FSYNC_LOCK;
in this case acquire FSYNC_LOCK as needed.
/* Unchain first */
ViceLog(25, ("Looking for FileEntries to unchain\n"));
H_LOCK;
+ FSYNC_LOCK;
/* Pick the first volume we see to clean up */
fid.Volume = fid.Vnode = fid.Unique = 0;
feip = &fe->fnext;
}
}
+ FSYNC_UNLOCK;
if (!myfe) {
- H_UNLOCK;
+ H_UNLOCK
return 0;
}
/* loop over FEs from myfe and free/break */
- FSYNC_UNLOCK;
tthead = 0;
for (fe = myfe; fe;) {
register struct CallBack *cbnext;
henumParms.ncbas = 0;
}
}
- FSYNC_LOCK;
- H_UNLOCK;;
+ H_UNLOCK;
/* Arrange to be called again */
return 1;
if ((code = LWP_WaitProcess(fsync_wait)) != LWP_SUCCESS)
ViceLog(0, ("LWP_WaitProcess returned %d\n", code));
#endif /* AFS_PTHREAD_ENV */
+ FSYNC_UNLOCK;
ViceLog(2, ("Checking for fsync events\n"));
do {
code = BreakLaterCallBacks();