From: Hannes Reinecke <hare@kernel.org>
To: 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,
Hannes Reinecke <hare@suse.de>
Subject: [PATCH 1/8] fs/configfs: rework configfs_is_root()
Date: Sat, 13 Jun 2026 13:14:30 +0200 [thread overview]
Message-ID: <20260613111437.101763-2-hare@kernel.org> (raw)
In-Reply-To: <20260613111437.101763-1-hare@kernel.org>
From: Hannes Reinecke <hare@suse.de>
configfs_is_root() should not check for static structures, but
use the information in the structure itself.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
fs/configfs/mount.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c
index 4929f3431189..e5c01d5e4d2d 100644
--- a/fs/configfs/mount.c
+++ b/fs/configfs/mount.c
@@ -49,7 +49,9 @@ static struct config_group configfs_root_group = {
int configfs_is_root(struct config_item *item)
{
- return item == &configfs_root_group.cg_item;
+ struct configfs_dirent *sd =
+ item->ci_dentry->d_fsdata;
+ return sd->s_type == CONFIGFS_ROOT;
}
static struct configfs_dirent configfs_root = {
--
2.51.0
next prev parent reply other threads:[~2026-06-13 11:15 UTC|newest]
Thread overview: 9+ 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 ` Hannes Reinecke [this message]
2026-06-13 11:14 ` [PATCH 2/8] fs/configfs: dynamically allocate super_info 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-13 11:14 ` [PATCH 8/8] nvmet: make configfs setup namespace aware 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=20260613111437.101763-2-hare@kernel.org \
--to=hare@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=brauner@kernel.org \
--cc=hare@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.