[sheepdog] [PATCH 1/2] work queue: allow null main thread
Liu Yuan
namei.unix at gmail.com
Wed Jul 3 04:23:25 CEST 2013
On Tue, Jul 02, 2013 at 12:35:27AM +0800, Liu Yuan wrote:
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
> lib/work.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/work.c b/lib/work.c
> index b09c0db..9adf622 100644
> --- a/lib/work.c
> +++ b/lib/work.c
> @@ -193,7 +193,8 @@ static void worker_thread_request_done(int fd, int events, void *data)
> work = list_first_entry(&list, struct work, w_list);
> list_del(&work->w_list);
>
> - work->done(work);
> + if (work->done)
> + work->done(work);
> uatomic_dec(&wi->nr_workers);
> }
> }
Drop this patch because we have to free http_work.
Thanks,
Yuan
More information about the sheepdog
mailing list