[PATCH v3 2/3] nvmet: avoid recursive configfs open for file-backed namespaces

Christoph Hellwig hch at lst.de
Wed Sep 9 22:26:04 PDT 2026


On Thu, Sep 10, 2026 at 12:53:59PM +0800, Runyu Xiao wrote:
> +	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 = file_open_root(&path, "", flags, 0);

Can we please still have this in the helper?




More information about the Linux-nvme mailing list