2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00

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: Aurelien Aptel <aaptel@suse.com>
CC: <stable@vger.kernel.org> # v5.11
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
Aurelien Aptel 2021-03-18 19:17:10 +01:00 committed by Steve French
parent 403dba003d
commit af3ef3b103

View File

@ -1196,9 +1196,11 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
pr_warn_once("Witness protocol support is experimental\n");
break;
case Opt_rootfs:
#ifdef CONFIG_CIFS_ROOT
ctx->rootfs = true;
#ifndef CONFIG_CIFS_ROOT
cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n");
goto cifs_parse_mount_err;
#endif
ctx->rootfs = true;
break;
case Opt_posixpaths:
if (result.negated)