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

From: Christoph Hellwig

Date: Thu Sep 10 2026 - 01:26:33 EST


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?