aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSuresh Jayaraman <sjayaraman@suse.de>2010-11-24 07:19:05 -0500
committerSteve French <sfrench@us.ibm.com>2010-11-30 00:49:28 -0500
commit607a569da4cf289fd8eb3887080ed3b212e3112d (patch)
tree9e8e54738ebe1c80718ba67d44a7f736ba0af879 /fs/cifs
parentfbeba8bb16d7c50362e28f3f91a79fb414903199 (diff)
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: Jeff Layton <jlayton@redhat.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 251a17c03545..32fa4d9b5dbc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1352,6 +1352,11 @@ cifs_parse_mount_options(char *options, const char *devname,
1352 "supported. Instead set " 1352 "supported. Instead set "
1353 "/proc/fs/cifs/LookupCacheEnabled to 0\n"); 1353 "/proc/fs/cifs/LookupCacheEnabled to 0\n");
1354 } else if (strnicmp(data, "fsc", 3) == 0) { 1354 } else if (strnicmp(data, "fsc", 3) == 0) {
1355#ifndef CONFIG_CIFS_FSCACHE
1356 cERROR(1, "FS-Cache support needs CONFIG_CIFS_FSCACHE"
1357 "kernel config option set");
1358 return 1;
1359#endif
1355 vol->fsc = true; 1360 vol->fsc = true;
1356 } else if (strnicmp(data, "mfsymlinks", 10) == 0) { 1361 } else if (strnicmp(data, "mfsymlinks", 10) == 0) {
1357 vol->mfsymlinks = true; 1362 vol->mfsymlinks = true;