From: Andy Whitcroft <apw@shadowen.org>
To: linux-cifs-client@lists.samba.org, samba-technical@lists.samba.org
Cc: sfrench@samba.org, linux-kernel@vger.kernel.org
Subject: [PATCH] cifs experimental off leads to compile errors
Date: Mon, 24 Apr 2006 11:45:53 +0100 [thread overview]
Message-ID: <20060424104553.GA1010@shadowen.org> (raw)
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.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
diff -upN reference/fs/cifs/cifs_debug.c current/fs/cifs/cifs_debug.c
--- reference/fs/cifs/cifs_debug.c
+++ current/fs/cifs/cifs_debug.c
@@ -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
diff -upN reference/fs/cifs/cifsfs.c current/fs/cifs/cifsfs.c
--- reference/fs/cifs/cifsfs.c
+++ current/fs/cifs/cifsfs.c
@@ -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;
diff -upN reference/fs/cifs/cifsglob.h current/fs/cifs/cifsglob.h
--- reference/fs/cifs/cifsglob.h
+++ current/fs/cifs/cifsglob.h
@@ -536,7 +536,11 @@ GLOBAL_EXTERN unsigned int multiuser_mou
have 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 sent
with more secure ntlmssp2 challenge/resp */
reply other threads:[~2006-04-24 10:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060424104553.GA1010@shadowen.org \
--to=apw@shadowen.org \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox