From: Eric Biggers <ebiggers@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH 2/3] block: untangle request_queue refcounting from sysfs
Date: Mon, 7 Nov 2022 11:57:36 -0800 [thread overview]
Message-ID: <Y2ljMMNLLy3lG8VA@sol.localdomain> (raw)
In-Reply-To: <20221105080815.775721-2-hch@lst.de>
On Sat, Nov 05, 2022 at 09:08:14AM +0100, Christoph Hellwig wrote:
> @@ -811,7 +772,8 @@ int blk_register_queue(struct gendisk *disk)
>
> mutex_lock(&q->sysfs_dir_lock);
>
> - ret = kobject_add(&q->kobj, &disk_to_dev(disk)->kobj, "queue");
> + kobject_init(&disk->queue_kobj, &blk_queue_ktype);
> + ret = kobject_add(&disk->queue_kobj, &disk_to_dev(disk)->kobj, "queue");
Use kobject_init_and_add()? Also, kobject_put() needs to be called on error.
- Eric
next prev parent reply other threads:[~2022-11-07 19:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 8:08 [PATCH 1/3] blk-crypto: pass a gendisk to blk_crypto_sysfs_register Christoph Hellwig
2022-11-05 8:08 ` [PATCH 2/3] block: untangle request_queue refcounting from sysfs Christoph Hellwig
2022-11-07 19:57 ` Eric Biggers [this message]
2022-11-09 13:01 ` Christoph Hellwig
2022-11-05 8:08 ` [PATCH 3/3] block: mark blk_put_queue as potentially blocking Christoph Hellwig
2022-11-07 19:55 ` [PATCH 1/3] blk-crypto: pass a gendisk to blk_crypto_sysfs_register Eric Biggers
2022-11-09 12:49 ` Christoph Hellwig
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=Y2ljMMNLLy3lG8VA@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.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