From: Al Viro <viro@zeniv.linux.org.uk>
To: Tingmao Wang <m@maowtm.org>
Cc: "Eric Van Hensbergen" <ericvh@kernel.org>,
"Dominique Martinet" <asmadeus@codewreck.org>,
"Latchesar Ionkov" <lucho@ionkov.net>,
"Christian Schoenebeck" <linux_oss@crudebyte.com>,
v9fs@lists.linux.dev, "Mickaël Salaün" <mic@digikod.net>,
"Günther Noack" <gnoack@google.com>,
linux-security-module@vger.kernel.org, "Jan Kara" <jack@suse.cz>,
"Amir Goldstein" <amir73il@gmail.com>,
"Matthew Bobrowski" <repnop@google.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH 1/6] fs/9p: Add ability to identify inode by path for .L
Date: Sat, 5 Jul 2025 01:19:13 +0100 [thread overview]
Message-ID: <20250705001913.GV1880847@ZenIV> (raw)
In-Reply-To: <e839a49e0673b12eb5a1ed2605a0a5267ff644db.1743971855.git.m@maowtm.org>
On Sun, Apr 06, 2025 at 09:43:02PM +0100, Tingmao Wang wrote:
> +struct v9fs_ino_path *make_ino_path(struct dentry *dentry)
> +{
> + struct v9fs_ino_path *path;
> + size_t path_components = 0;
> + struct dentry *curr = dentry;
> + ssize_t i;
> +
> + lockdep_assert_held_read(&v9fs_dentry2v9ses(dentry)->rename_sem);
> +
> + rcu_read_lock();
> +
> + /* Don't include the root dentry */
> + while (curr->d_parent != curr) {
> + path_components++;
> + curr = curr->d_parent;
> + }
> + if (WARN_ON(path_components > SSIZE_MAX)) {
> + rcu_read_unlock();
> + return NULL;
> + }
> +
> + path = kmalloc(struct_size(path, names, path_components),
> + GFP_KERNEL);
Blocking allocation under rcu_read_lock().
next prev parent reply other threads:[~2025-07-05 0:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-06 20:43 [RFC PATCH 0/6] fs/9p: Reuse inode based on path (in addition to qid) Tingmao Wang
2025-04-06 20:43 ` [RFC PATCH 1/6] fs/9p: Add ability to identify inode by path for .L Tingmao Wang
2025-07-05 0:19 ` Al Viro [this message]
2025-07-05 0:25 ` Al Viro
2025-07-11 19:11 ` Tingmao Wang
2025-08-08 8:32 ` Mickaël Salaün
2025-08-12 23:57 ` Tingmao Wang
2025-08-13 7:47 ` Mickaël Salaün
2025-07-11 19:11 ` Tingmao Wang
2025-04-06 20:43 ` [RFC PATCH 2/6] fs/9p: add default option for path-based inodes Tingmao Wang
2025-04-06 20:43 ` [RFC PATCH 3/6] fs/9p: Hide inodeident=path from show_options as it is the default Tingmao Wang
2025-04-06 20:43 ` [RFC PATCH 4/6] fs/9p: Add ability to identify inode by path for non-.L Tingmao Wang
2025-07-11 19:12 ` Tingmao Wang
2025-04-06 20:43 ` [RFC PATCH 5/6] fs/9p: .L: Refresh stale inodes on reuse Tingmao Wang
2025-04-06 20:43 ` [RFC PATCH 6/6] fs/9p: non-.L: " Tingmao Wang
2025-07-04 18:37 ` [RFC PATCH 0/6] fs/9p: Reuse inode based on path (in addition to qid) Mickaël Salaün
2025-08-08 10:27 ` Dominique Martinet
2025-08-08 10:52 ` Christian Schoenebeck
2025-08-12 23:53 ` Tingmao Wang
2025-08-13 5:30 ` Dominique Martinet
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=20250705001913.GV1880847@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=amir73il@gmail.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=gnoack@google.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=m@maowtm.org \
--cc=mic@digikod.net \
--cc=repnop@google.com \
--cc=v9fs@lists.linux.dev \
/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).