All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Xiaotian Feng <dfeng@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Stephen Hemminger <shemminger@vyatta.com>,
	Nikanth Karthikesan <knikanth@suse.de>,
	David Teigland <teigland@redhat.com>
Subject: Re: [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path
Date: Mon, 23 Aug 2010 12:31:23 +0200	[thread overview]
Message-ID: <4C724DFB.2060707@kernel.dk> (raw)
In-Reply-To: <1281696292-5746-1-git-send-email-dfeng@redhat.com>

On 2010-08-13 12:44, Xiaotian Feng wrote:
> kernel needs to kobject_put on dev->kobj if elv_register_queue fails.
> 
> Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: Stephen Hemminger <shemminger@vyatta.com>
> Cc: Nikanth Karthikesan <knikanth@suse.de>
> Cc: David Teigland <teigland@redhat.com>
> ---
>  block/blk-sysfs.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index 001ab18..0749b89 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -511,6 +511,7 @@ int blk_register_queue(struct gendisk *disk)
>  		kobject_uevent(&q->kobj, KOBJ_REMOVE);
>  		kobject_del(&q->kobj);
>  		blk_trace_remove_sysfs(disk_to_dev(disk));
> +		kobject_put(&dev->kobj);
>  		return ret;
>  	}
>  

Looks correct. Thanks, applied.

-- 
Jens Axboe


      reply	other threads:[~2010-08-23 10:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 10:44 [PATCH] blk-fs: put dev->kobj in blk_register_queue fail path Xiaotian Feng
2010-08-23 10:31 ` Jens Axboe [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=4C724DFB.2060707@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=dfeng@redhat.com \
    --cc=knikanth@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=shemminger@vyatta.com \
    --cc=teigland@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.