From: Snaipe <me@snai.pe>
To: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
Subject: [RFC PATCH 0/1] Bind-mounting memfds
Date: Thu, 29 Jan 2026 18:35:14 +0100 [thread overview]
Message-ID: <20260129173515.1649305-1-me@snai.pe> (raw)
From: "Franklin \"Snaipe\" Mathieu" <me@snai.pe>
Hi folks,
I'm sending this patch that allows the use of open_tree on a memfd with
the intent of bind-mounting it.
I am unsure about the execution of this patch. shm_mnt fails the is_mounted
check, but unlike pidfs and nsfs I can't compare the dentry's d_op
against a known dentry ops global.
I opted for a simple check of path->mnt against shm_mnt but I'm not sure
it's the best approach. Please advise if there's anything better,
otherwise, the patch itself should be straigtforward enough.
Franklin "Snaipe" Mathieu (1):
fs,ns: allow copying of shm_mnt mount trees
fs/namespace.c | 8 ++++++++
mm/internal.h | 2 ++
mm/shmem.c | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
--
2.52.0
next reply other threads:[~2026-01-29 17:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 17:35 Snaipe [this message]
2026-01-29 17:35 ` [RFC PATCH 1/1] fs,ns: allow copying of shm_mnt mount trees Snaipe
2026-01-30 8:38 ` Johannes Thumshirn
2026-01-30 14:17 ` Snaipe
2026-02-04 16:51 ` Christian Brauner
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=20260129173515.1649305-1-me@snai.pe \
--to=me@snai.pe \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.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