All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Keith Busch <kbusch@kernel.org>,
	Logan Gunthorpe <logang@deltatee.com>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH v2 2/3] nvmet: avoid recursive configfs open for file-backed namespaces
Date: Wed, 2 Sep 2026 12:32:02 +0200	[thread overview]
Message-ID: <20260902103202.GB8095@lst.de> (raw)
In-Reply-To: <20260819155228.84938-3-runyu.xiao@seu.edu.cn>

> +	ret = kern_path(ns->device_path, LOOKUP_FOLLOW, &path);
> +	if (ret) {
> +		pr_err("failed to open file %s: (%d)\n",
> +		       ns->device_path, ret);
> +		return ret;
> +	}
> +
> +	if (configfs_path_is_configfs(&path)) {
> +		pr_err("configfs paths cannot back namespace %s\n",
> +		       ns->device_path);
> +		path_put(&path);
> +		return -EINVAL;
> +	}
> +
> +	ns->file = dentry_open(&path, flags, current_cred());

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.



  parent reply	other threads:[~2026-09-02 10:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 14:37 [PATCH 0/2] nvmet: avoid configfs recursion when enabling backends Runyu Xiao
2026-08-17 14:37 ` [PATCH 1/2] nvmet: avoid recursive configfs open for file-backed namespaces Runyu Xiao
2026-08-19  5:46   ` Christoph Hellwig
2026-08-17 14:37 ` [PATCH 2/2] nvmet: avoid recursive configfs open for passthru Runyu Xiao
2026-08-19 15:52 ` [PATCH v2 0/3] nvmet: avoid recursive configfs open Runyu Xiao
2026-08-19 15:52   ` [PATCH v2 1/3] fs: configfs: add helper to identify configfs paths Runyu Xiao
2026-08-23  0:24     ` Sagi Grimberg
2026-09-02 10:31     ` Christoph Hellwig
2026-08-19 15:52   ` [PATCH v2 2/3] nvmet: avoid recursive configfs open for file-backed namespaces Runyu Xiao
2026-08-23  0:24     ` Sagi Grimberg
2026-09-02 10:32     ` Christoph Hellwig [this message]
2026-09-10  4:53       ` [PATCH v3 0/3] nvmet: avoid recursive configfs open Runyu Xiao
2026-09-10  4:53         ` [PATCH v3 1/3] fs: configfs: add helper to identify configfs paths Runyu Xiao
2026-09-10  4:53         ` [PATCH v3 2/3] nvmet: avoid recursive configfs open for file-backed namespaces Runyu Xiao
2026-09-10  5:26           ` Christoph Hellwig
2026-09-10  4:54         ` [PATCH v3 3/3] nvmet: avoid recursive configfs open for passthru Runyu Xiao
2026-08-19 15:52   ` [PATCH v2 " Runyu Xiao
2026-08-23  0:24     ` Sagi Grimberg

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=20260902103202.GB8095@lst.de \
    --to=hch@lst.de \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=logang@deltatee.com \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=sagi@grimberg.me \
    --cc=stable@vger.kernel.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.