cifs experimental off leads to compile errors
PATCH 1/1 cifs experimental off leads to compile errors
As of 2.6.17-rc2-git5 it seems that CIFS has stopped working if CIFS_EXPERIMENTAL isn't enabled . The following sorts out the errors, but I am not sure if the semantics of the experimEnabled_write() are correct when CIFS_EXPERIMENTAL is disabled.
-apw
=== 8< ===
cifs experimental off leads to compile errors
When compiling with CIFS enabled but with CIFS_EXPERIMENTAL disabled you get link errors as below.
fs/built-in.o(.text+0x11bf8c): In function `.cifs_setup_session':
: undefined reference to `.CIFS_SessSetup'
It seems that we need to help the optimiser out more when disabling this code. This patch turns the experimEnabled variable into the constant (0) when experimental support is not compiled in.
---
fs/cifs/cifs_debug.c +4 -0
@@ -616,6 +616,7 @@ experimEnabled_write(struct file *file, rc =get_user (c, buffer);if (rc)return rc; +#ifdef CONFIG_CIFS_EXPERIMENTAL if (c =='0' || c =='n' || c =='N' ) experimEnabled =0 ;else if (c =='1' || c =='y' || c =='Y' )
@@ -624,6 +625,9 @@ experimEnabled_write(struct file *file, experimEnabled =2 ;return count; +#else +return -ENOSYS ; +#endif } static int
fs/cifs/cifsfs.c +2 -0
@@ -52,7 +52,9 @@ int cifsFYI = 0;int cifsERROR =1 ;int traceSMB =0 ;unsigned int oplockEnabled =1 ; +#ifdef CONFIG_CIFS_EXPERIMENTAL unsigned int experimEnabled =0 ; +#endif unsigned int linuxExtEnabled =1 ;unsigned int lookupCacheEnabled =1 ;unsigned int multiuser_mount =0 ;
fs/cifs/cifsglob.h +4 -0
@@ -536,7 +536,11 @@ GLOBAL_EXTERN unsigned int multiuser_mouhave the uid/password or Kerberos credential or equivalent for current user */ GLOBAL_EXTERN unsigned int oplockEnabled; +#ifdef CONFIG_CIFS_EXPERIMENTAL GLOBAL_EXTERN unsigned int experimEnabled; +#else +#define experimEnabled (0) +#endif GLOBAL_EXTERN unsigned int lookupCacheEnabled; GLOBAL_EXTERN unsigned int extended_security; /* if on, session setup sentwith more secure ntlmssp2 challenge/resp */