Commit af3ef3b1 authored by Aurelien Aptel's avatar Aurelien Aptel Committed by Steve French

cifs: warn and fail if trying to use rootfs without the config option

If CONFIG_CIFS_ROOT is not set, rootfs mount option is invalid
Signed-off-by: default avatarAurelien Aptel <aaptel@suse.com>
CC: <stable@vger.kernel.org> # v5.11
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 403dba00
...@@ -1196,9 +1196,11 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ...@@ -1196,9 +1196,11 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
pr_warn_once("Witness protocol support is experimental\n"); pr_warn_once("Witness protocol support is experimental\n");
break; break;
case Opt_rootfs: case Opt_rootfs:
#ifdef CONFIG_CIFS_ROOT #ifndef CONFIG_CIFS_ROOT
ctx->rootfs = true; cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n");
goto cifs_parse_mount_err;
#endif #endif
ctx->rootfs = true;
break; break;
case Opt_posixpaths: case Opt_posixpaths:
if (result.negated) if (result.negated)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment