From: "Maurizio Lombardi" <mlombard@arkamax.eu>
To: "Hannes Reinecke" <hare@kernel.org>,
"Christian Brauner" <brauner@kernel.org>
Cc: "Jan Kara" <jack@suse.cz>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
<linux-fsdevel@vger.kernel.org>, <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH 8/8] nvmet: make configfs setup namespace aware
Date: Tue, 16 Jun 2026 11:11:09 +0200 [thread overview]
Message-ID: <DJACVCF5YTMZ.3TWM3MQYJCMA@arkamax.eu> (raw)
In-Reply-To: <20260613111437.101763-9-hare@kernel.org>
On Sat Jun 13, 2026 at 1:14 PM CEST, Hannes Reinecke wrote:
> Implement 'fill_subsystem' and 'clear_subsystem' callbacks to make
> nvmet configfs namespace aware.
>
> +static int nvmet_add_port_list(u64 ns_id, struct nvmet_port *p)
> +{
> + struct list_head *port_list;
> +
> + mutex_lock(&nvmet_ports_mutex);
> + port_list = idr_find(&nvmet_ports_idr, ns_id);
> + if (!port_list) {
> + int err;
> +
> + port_list = kzalloc_obj(*port_list);
> + if (!port_list)
> + return -ENOMEM;
> + INIT_LIST_HEAD(port_list);
> + err = idr_alloc(&nvmet_ports_idr, port_list,
> + ns_id, ns_id + 1, GFP_KERNEL);
> + if (err < 0) {
> + kfree(port_list);
> + return err;
> + }
> + WARN_ON(err != ns_id);
> + }
> + list_add(&p->global_entry, port_list);
> + mutex_unlock(&nvmet_ports_mutex);
> + return 0;
> +}
Just a minor thing that I noticed: the error paths leave the mutex
locked.
Maurizio
next prev parent reply other threads:[~2026-06-16 9:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-13 11:14 [RFC PATCH 0/8] namespace-aware configfs Hannes Reinecke
2026-06-13 11:14 ` [PATCH 1/8] fs/configfs: rework configfs_is_root() Hannes Reinecke
2026-06-13 11:14 ` [PATCH 2/8] fs/configfs: dynamically allocate super_info Hannes Reinecke
2026-06-15 14:23 ` Johannes Thumshirn
2026-06-16 6:43 ` Hannes Reinecke
2026-06-13 11:14 ` [PATCH 3/8] fs/configfs: separate out configfs_{link,unlink}_root() Hannes Reinecke
2026-06-13 11:14 ` [PATCH 4/8] fs/namespace: implement mnt_clone_direct() Hannes Reinecke
2026-06-13 11:14 ` [PATCH 5/8] fs/configfs: add superblock as attribute to configfs_pin_fs() Hannes Reinecke
2026-06-13 11:14 ` [PATCH 6/8] fs/configfs: add 'fill_subsystem' and 'clear_subsystem' callbacks Hannes Reinecke
2026-06-13 11:14 ` [PATCH 7/8] fs/configfs: switch to get_tree_keyed() Hannes Reinecke
2026-06-17 11:51 ` Christian Brauner
2026-06-17 12:46 ` Hannes Reinecke
2026-06-13 11:14 ` [PATCH 8/8] nvmet: make configfs setup namespace aware Hannes Reinecke
2026-06-16 9:11 ` Maurizio Lombardi [this message]
2026-06-16 9:33 ` Hannes Reinecke
2026-06-17 11:17 ` Christian Brauner
2026-06-17 11:44 ` Hannes Reinecke
2026-06-17 11:58 ` [RFC PATCH 0/8] namespace-aware configfs Christian Brauner
2026-06-17 12:55 ` Hannes Reinecke
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=DJACVCF5YTMZ.3TWM3MQYJCMA@arkamax.eu \
--to=mlombard@arkamax.eu \
--cc=a.hindborg@kernel.org \
--cc=brauner@kernel.org \
--cc=hare@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.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