From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: Mark Ruijter <MRuijter@onestopsystems.com>,
hch@lst.de, linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCH V3 2/2] nvmet: make ctrl model configurable
Date: Fri, 22 Nov 2019 14:45:43 +0100 [thread overview]
Message-ID: <20191122134543.GB26083@lst.de> (raw)
In-Reply-To: <20191122074154.12159-3-chaitanya.kulkarni@wdc.com>
On Thu, Nov 21, 2019 at 11:41:54PM -0800, Chaitanya Kulkarni wrote:
> From: Mark Ruijter <MRuijter@onestopsystems.com>
>
> From: Mark Ruijter <MRuijter@onestopsystems.com>
That From line seems duplicated.
> Signed-off-by: Mark Ruijter <MRuijter@onestopsystems.com>
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Please add a very short summary of what you changed in [] braces
before your signoff.
> + down_write(&nvmet_config_sem);
> + len = strcspn(page, "\n");
> + if (!len)
> + goto out_unlock;
No need for the lock until we free the old subsys->model and
assign the new one. Which will again simplify the error handling.
> +++ b/drivers/nvme/target/core.c
> @@ -1419,6 +1419,7 @@ struct nvmet_subsys *nvmet_subsys_alloc(const char *subsysnqn,
> kfree(subsys);
> return ERR_PTR(-ENOMEM);
> }
> + subsys->model = NULL;
subsys is allocated using kzalloc a few lines above, no need to zero
->model.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
prev parent reply other threads:[~2019-11-22 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 7:41 [PATCH 0/2] nvmet: make model and ctrl-id configurable Chaitanya Kulkarni
2019-11-22 7:41 ` [PATCH V2 1/2] nvmet: make " Chaitanya Kulkarni
2019-11-22 13:43 ` Christoph Hellwig
2019-11-22 7:41 ` [PATCH V3 2/2] nvmet: make ctrl model configurable Chaitanya Kulkarni
2019-11-22 13:45 ` Christoph Hellwig [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=20191122134543.GB26083@lst.de \
--to=hch@lst.de \
--cc=MRuijter@onestopsystems.com \
--cc=chaitanya.kulkarni@wdc.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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).