Re: [PATCH v2 2/3] nvmet: avoid recursive configfs open for file-backed namespaces
From: Christoph Hellwig
Date: Wed Sep 02 2026 - 06:42:29 EST
> + 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.