From: Hou Tao <houtao1@huawei.com>
To: <linux-block@vger.kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] block: genhd: skip blk_register_region() for disk using ext-dev
Date: Tue, 11 Feb 2020 21:15:29 +0800 [thread overview]
Message-ID: <47ca3cc9-35bf-6474-f4b5-6e95e94d27b5@huawei.com> (raw)
In-Reply-To: <20191111014946.54533-1-houtao1@huawei.com>
ping ?
On 2019/11/11 9:49, Hou Tao wrote:
> It doesn't incur any harm now when the range parameter of
> blk_register_region() is zero, but let's skip the useless call of
> blk_register_region() for disk which uses ext-dev.
>
> Signed-off-by: Hou Tao <houtao1@huawei.com>
> ---
> block/genhd.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/block/genhd.c b/block/genhd.c
> index 26b31fcae217..c61b59b550b0 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -739,8 +739,9 @@ static void __device_add_disk(struct device *parent, struct gendisk *disk,
> ret = bdi_register_owner(disk->queue->backing_dev_info,
> disk_to_dev(disk));
> WARN_ON(ret);
> - blk_register_region(disk_devt(disk), disk->minors, NULL,
> - exact_match, exact_lock, disk);
> + if (disk->minors)
> + blk_register_region(disk_devt(disk), disk->minors, NULL,
> + exact_match, exact_lock, disk);
> }
> register_disk(parent, disk, groups);
> if (register_queue)
>
prev parent reply other threads:[~2020-02-11 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 1:49 [PATCH] block: genhd: skip blk_register_region() for disk using ext-dev Hou Tao
2020-02-11 13:15 ` Hou Tao [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=47ca3cc9-35bf-6474-f4b5-6e95e94d27b5@huawei.com \
--to=houtao1@huawei.com \
--cc=axboe@kernel.dk \
--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;
as well as URLs for NNTP newsgroup(s).