Rename variable for clarity

parent e2a7469f
......@@ -2954,7 +2954,7 @@ logbuffer_flush_finish(struct fellow_fd *ffd,
struct fellow_logbuffer_ff *ff;
struct buddy_ptr_extent alloc;
struct buddy_reqs *reqs;
int needthread;
unsigned need_work;
assert(cap(can, LBUF_CAN_REF));
......@@ -2980,7 +2980,7 @@ logbuffer_flush_finish(struct fellow_fd *ffd,
FF_TRANSITION(ff, FF_INVAL, FF_SCHEDULED);
AZ(pthread_mutex_lock(lbuf->phase_mtx));
needthread = VLIST_EMPTY(&ffd->ffhead);
need_work = VLIST_EMPTY(&ffd->ffhead);
VLIST_INSERT_HEAD(&ffd->ffhead, ff, list);
ffd->nff++;
lbuf->ff = ff;
......@@ -2993,7 +2993,7 @@ logbuffer_flush_finish(struct fellow_fd *ffd,
#endif
if (doclose) {
if (needthread)
if (need_work)
logbuffer_flush_finish_work(NULL, ff);
else
logbuffer_wait_flush_fini(lbuf);
......@@ -3001,7 +3001,7 @@ logbuffer_flush_finish(struct fellow_fd *ffd,
}
// if scheduling a task fails, run in this thread
if (needthread &&
if (need_work &&
ffd->taskrun(logbuffer_flush_finish_work, ff, &ff->taskstate))
logbuffer_flush_finish_work(NULL, ff);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment