Linux Container Development
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH] Fixes for the deferqueue_add() function (v2)
Date: Wed, 24 Jun 2009 12:38:25 -0400	[thread overview]
Message-ID: <4A425681.50503@cs.columbia.edu> (raw)
In-Reply-To: <1245435505-24842-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>



Dan Smith wrote:
> I'm not sure how the deferqueue would (or has ever) worked without these
> modifications, but I had to make them in order to use it :)
> 
> Changes (v2):
>   - Remove unnecessary initialization of the new list item
> 
> Cc: orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Of course... added.

Thanks,

Oren.

> ---
>  kernel/deferqueue.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/deferqueue.c b/kernel/deferqueue.c
> index efd99d5..3fb388b 100644
> --- a/kernel/deferqueue.c
> +++ b/kernel/deferqueue.c
> @@ -66,7 +66,7 @@ int deferqueue_add(struct deferqueue_head *head, void *data, int size,
>  {
>  	struct deferqueue_entry *dq;
>  
> -	dq = kmalloc(sizeof(dq) + size, GFP_KERNEL);
> +	dq = kmalloc(sizeof(*dq) + size, GFP_KERNEL);
>  	if (!dq)
>  		return -ENOMEM;
>  
> @@ -77,7 +77,7 @@ int deferqueue_add(struct deferqueue_head *head, void *data, int size,
>  	pr_debug("%s: adding work %p func %p dtor %p\n",
>  		 __func__, dq, func, dtor);
>  	spin_lock(&head->lock);
> -	list_add_tail(&head->list, &dq->list);
> +	list_add_tail(&dq->list, &head->list);
>  	spin_unlock(&head->lock);
>  	return 0;
>  }

      parent reply	other threads:[~2009-06-24 16:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 18:18 [PATCH] Fixes for the deferqueue_add() function (v2) Dan Smith
     [not found] ` <1245435505-24842-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-19 18:36   ` Serge E. Hallyn
2009-06-22  3:20   ` Amerigo Wang
2009-06-24 16:38   ` Oren Laadan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A425681.50503@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox