From: Jens Axboe <jens.axboe@oracle.com>
To: crquan@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [GENDISK] fix disk_part_tbl always alloced in node 0: set node_id before refered in alloc_disk
Date: Thu, 20 Nov 2008 08:35:01 +0100 [thread overview]
Message-ID: <20081120073501.GZ26308@kernel.dk> (raw)
In-Reply-To: <1227110965-12606-1-git-send-email-crquan@gmail.com>
On Thu, Nov 20 2008, crquan@gmail.com wrote:
> From: Cheng Renquan <crquan@gmail.com>
>
> disk->node_id will be refered in allocating in disk_expand_part_tbl, so we
> should set it before disk->node_id is refered.
>
> Signed-off-by: Cheng Renquan <crquan@gmail.com>
> ---
> block/genhd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/block/genhd.c b/block/genhd.c
> index 27549e4..2f7feda 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -1102,6 +1102,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
> kfree(disk);
> return NULL;
> }
> + disk->node_id = node_id;
> if (disk_expand_part_tbl(disk, 0)) {
> free_part_stats(&disk->part0);
> kfree(disk);
> @@ -1116,7 +1117,6 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
> device_initialize(disk_to_dev(disk));
> INIT_WORK(&disk->async_notify,
> media_change_notify_thread);
> - disk->node_id = node_id;
> }
> return disk;
> }
Good spotting, applied!
--
Jens Axboe
prev parent reply other threads:[~2008-11-20 7:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-19 16:09 [PATCH] [GENDISK] fix disk_part_tbl always alloced in node 0: set node_id before refered in alloc_disk crquan
2008-11-20 7:35 ` 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=20081120073501.GZ26308@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=crquan@gmail.com \
--cc=linux-kernel@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