Re: [PATCH v3 2/3] nvmet: avoid recursive configfs open for file-backed namespaces
From: Runyu Xiao
Date: Mon Sep 21 2026 - 04:19:40 EST
On Wed, Sep 2, 2026 at 12:32:02PM +0200, Christoph Hellwig wrote:
> This section of code really should have a helper in configfs. And should
> also be used in other callers like the SCSI target patches you also sent
> out.
On Thu, Sep 10, 2026 at 07:26:04AM +0200, Christoph Hellwig wrote:
> + ns->file = file_open_root(&path, "", flags, 0);
>
> Can we please still have this in the helper?
Thanks, understood. I will move the path lookup, configfs filesystem
check, and file_open_root() call into the common configfs helper, and
update both nvmet callers to use it.
I will also keep the target-core caller on the resolved-root path so the
db_root TOCTOU fix is preserved, rather than reopening db_root from its
mutable pathname.
I will send v4 in this thread.
Thanks,
Runyu