factotum: fix log read inuse bug

When log reading exits, inuse flag should be cleared.

Signed-off-by: Tw <wei.tan@intel.com>
This commit is contained in:
Tw 2021-07-12 11:21:00 +08:00 committed by Dan Cross
parent c57b71966e
commit 9dab36f2af
3 changed files with 3 additions and 0 deletions

View file

@ -111,6 +111,7 @@ extern char *owner; /* main.c */
extern Proto *prototab[]; /* main.c */ extern Proto *prototab[]; /* main.c */
extern Ring ring; /* key.c */ extern Ring ring; /* key.c */
extern char *rpcname[]; /* rpc.c */ extern char *rpcname[]; /* rpc.c */
extern int *loginuse; /* fs.c */
extern char Easproto[]; /* err.c */ extern char Easproto[]; /* err.c */

View file

@ -260,6 +260,7 @@ fskickreply(Conv *c)
static int inuse[nelem(dirtab)]; static int inuse[nelem(dirtab)];
int *confirminuse = &inuse[0]; int *confirminuse = &inuse[0];
int *needkeyinuse = &inuse[1]; int *needkeyinuse = &inuse[1];
int *loginuse = &inuse[5];
static void static void
fsopen(Req *r) fsopen(Req *r)
{ {

View file

@ -107,6 +107,7 @@ void
logflush(Req *r) logflush(Req *r)
{ {
lbflush(&logbuf, r); lbflush(&logbuf, r);
*loginuse = 0;
} }
void void