Commit 607a569d authored by Suresh Jayaraman's avatar Suresh Jayaraman Committed by Steve French

cifs: allow fsc mount option only if CONFIG_CIFS_FSCACHE is set

Currently, it is possible to specify 'fsc' mount option even if
CONFIG_CIFS_FSCACHE has not been set. The option is being ignored silently
while the user fscache functionality to work. Fix this by raising error when
the CONFIG option is not set.
Reported-by: default avatarJeff Layton <jlayton@redhat.com>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSuresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent fbeba8bb
...@@ -1352,6 +1352,11 @@ cifs_parse_mount_options(char *options, const char *devname, ...@@ -1352,6 +1352,11 @@ cifs_parse_mount_options(char *options, const char *devname,
"supported. Instead set " "supported. Instead set "
"/proc/fs/cifs/LookupCacheEnabled to 0\n"); "/proc/fs/cifs/LookupCacheEnabled to 0\n");
} else if (strnicmp(data, "fsc", 3) == 0) { } else if (strnicmp(data, "fsc", 3) == 0) {
#ifndef CONFIG_CIFS_FSCACHE
cERROR(1, "FS-Cache support needs CONFIG_CIFS_FSCACHE"
"kernel config option set");
return 1;
#endif
vol->fsc = true; vol->fsc = true;
} else if (strnicmp(data, "mfsymlinks", 10) == 0) { } else if (strnicmp(data, "mfsymlinks", 10) == 0) {
vol->mfsymlinks = true; vol->mfsymlinks = true;
......
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