aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/CHANGES2
-rw-r--r--fs/cifs/cifs_unicode.c5
-rw-r--r--fs/cifs/cifsfs.c11
-rw-r--r--fs/cifs/cifsproto.h2
-rw-r--r--fs/cifs/cifssmb.c2
-rw-r--r--fs/cifs/cn_cifs.h37
-rw-r--r--fs/cifs/connect.c1
-rw-r--r--fs/cifs/inode.c2
8 files changed, 51 insertions, 11 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 5bab24f590..eab3750cf3 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -2,7 +2,7 @@ Version 1.39
2------------ 2------------
3Defer close of a file handle slightly if pending writes depend on that file handle 3Defer close of a file handle slightly if pending writes depend on that file handle
4(this reduces the EBADF bad file handle errors that can be logged under heavy 4(this reduces the EBADF bad file handle errors that can be logged under heavy
5stress on writes). 5stress on writes). Modify cifs Kconfig options to expose CONFIG_CIFS_STATS2
6 6
7Version 1.38 7Version 1.38
8------------ 8------------
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c
index 99a096d3f8..4e12053f08 100644
--- a/fs/cifs/cifs_unicode.c
+++ b/fs/cifs/cifs_unicode.c
@@ -74,10 +74,11 @@ cifs_strtoUCS(wchar_t * to, const char *from, int len,
74 cERROR(1, 74 cERROR(1,
75 ("cifs_strtoUCS: char2uni returned %d", 75 ("cifs_strtoUCS: char2uni returned %d",
76 charlen)); 76 charlen));
77 to[i] = cpu_to_le16(0x003f); /* a question mark */ 77 /* A question mark */
78 to[i] = (wchar_t)cpu_to_le16(0x003f);
78 charlen = 1; 79 charlen = 1;
79 } else 80 } else
80 to[i] = cpu_to_le16(to[i]); 81 to[i] = (wchar_t)cpu_to_le16(to[i]);
81 82
82 } 83 }
83 84
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 877095a119..682b0235ad 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -405,6 +405,7 @@ static struct quotactl_ops cifs_quotactl_ops = {
405}; 405};
406#endif 406#endif
407 407
408#ifdef CONFIG_CIFS_EXPERIMENTAL
408static void cifs_umount_begin(struct super_block * sblock) 409static void cifs_umount_begin(struct super_block * sblock)
409{ 410{
410 struct cifs_sb_info *cifs_sb; 411 struct cifs_sb_info *cifs_sb;
@@ -422,16 +423,18 @@ static void cifs_umount_begin(struct super_block * sblock)
422 tcon->tidStatus = CifsExiting; 423 tcon->tidStatus = CifsExiting;
423 up(&tcon->tconSem); 424 up(&tcon->tconSem);
424 425
426 /* cancel_brl_requests(tcon); */
427 /* cancel_notify_requests(tcon); */
425 if(tcon->ses && tcon->ses->server) 428 if(tcon->ses && tcon->ses->server)
426 { 429 {
427 cERROR(1,("wake up tasks now - umount begin not complete")); 430 cFYI(1,("wake up tasks now - umount begin not complete"));
428 wake_up_all(&tcon->ses->server->request_q); 431 wake_up_all(&tcon->ses->server->request_q);
429 } 432 }
430/* BB FIXME - finish add checks for tidStatus BB */ 433/* BB FIXME - finish add checks for tidStatus BB */
431 434
432 return; 435 return;
433} 436}
434 437#endif
435 438
436static int cifs_remount(struct super_block *sb, int *flags, char *data) 439static int cifs_remount(struct super_block *sb, int *flags, char *data)
437{ 440{
@@ -450,7 +453,9 @@ struct super_operations cifs_super_ops = {
450 unless later we add lazy close of inodes or unless the kernel forgets to call 453 unless later we add lazy close of inodes or unless the kernel forgets to call
451 us with the same number of releases (closes) as opens */ 454 us with the same number of releases (closes) as opens */
452 .show_options = cifs_show_options, 455 .show_options = cifs_show_options,
453/* .umount_begin = cifs_umount_begin, */ /* BB finish in the future */ 456#ifdef CONFIG_CIFS_EXPERIMENTAL
457 .umount_begin = cifs_umount_begin,
458#endif
454 .remount_fs = cifs_remount, 459 .remount_fs = cifs_remount,
455}; 460};
456 461
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index d301149b1b..1b73f4f4c5 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -242,11 +242,11 @@ extern int CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
242 const int netfid, const unsigned int count, 242 const int netfid, const unsigned int count,
243 const __u64 offset, unsigned int *nbytes, 243 const __u64 offset, unsigned int *nbytes,
244 struct kvec *iov, const int nvec, const int long_op); 244 struct kvec *iov, const int nvec, const int long_op);
245#endif /* CONFIG_CIFS_EXPERIMENTAL */
245extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, 246extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
246 const unsigned char *searchName, __u64 * inode_number, 247 const unsigned char *searchName, __u64 * inode_number,
247 const struct nls_table *nls_codepage, 248 const struct nls_table *nls_codepage,
248 int remap_special_chars); 249 int remap_special_chars);
249#endif /* CONFIG_CIFS_EXPERIMENTAL */
250extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, 250extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen,
251 const struct nls_table * codepage); 251 const struct nls_table * codepage);
252extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, 252extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen,
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 9312bfc566..a53c596e10 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2959,7 +2959,6 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, const __u16 searchHandle
2959 return rc; 2959 return rc;
2960} 2960}
2961 2961
2962#ifdef CONFIG_CIFS_EXPERIMENTAL
2963int 2962int
2964CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, 2963CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
2965 const unsigned char *searchName, 2964 const unsigned char *searchName,
@@ -3053,7 +3052,6 @@ GetInodeNumOut:
3053 goto GetInodeNumberRetry; 3052 goto GetInodeNumberRetry;
3054 return rc; 3053 return rc;
3055} 3054}
3056#endif /* CIFS_EXPERIMENTAL */
3057 3055
3058int 3056int
3059CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, 3057CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
diff --git a/fs/cifs/cn_cifs.h b/fs/cifs/cn_cifs.h
new file mode 100644
index 0000000000..ea59ccac2e
--- /dev/null
+++ b/fs/cifs/cn_cifs.h
@@ -0,0 +1,37 @@
1/*
2 * fs/cifs/cn_cifs.h
3 *
4 * Copyright (c) International Business Machines Corp., 2002
5 * Author(s): Steve French (sfrench@us.ibm.com)
6 *
7 * This library is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published
9 * by the Free Software Foundation; either version 2.1 of the License, or
10 * (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
15 * the GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef _CN_CIFS_H
23#define _CN_CIFS_H
24#ifdef CONFIG_CIFS_UPCALL
25#include <linux/types.h>
26#include <linux/connector.h>
27
28struct cifs_upcall {
29 char signature[4]; /* CIFS */
30 enum command {
31 CIFS_GET_IP = 0x00000001, /* get ip address for hostname */
32 CIFS_GET_SECBLOB = 0x00000002, /* get SPNEGO wrapped blob */
33 } command;
34 /* union cifs upcall data follows */
35};
36#endif /* CIFS_UPCALL */
37#endif /* _CN_CIFS_H */
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 450ab75d65..2cb620716b 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -42,6 +42,7 @@
42#include "ntlmssp.h" 42#include "ntlmssp.h"
43#include "nterr.h" 43#include "nterr.h"
44#include "rfc1002pdu.h" 44#include "rfc1002pdu.h"
45#include "cn_cifs.h"
45 46
46#define CIFS_PORT 445 47#define CIFS_PORT 445
47#define RFC1001_PORT 139 48#define RFC1001_PORT 139
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 912d401600..923d071163 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -283,7 +283,6 @@ int cifs_get_inode_info(struct inode **pinode,
283 there Windows server or network appliances for which 283 there Windows server or network appliances for which
284 IndexNumber field is not guaranteed unique? */ 284 IndexNumber field is not guaranteed unique? */
285 285
286#ifdef CONFIG_CIFS_EXPERIMENTAL
287 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){ 286 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){
288 int rc1 = 0; 287 int rc1 = 0;
289 __u64 inode_num; 288 __u64 inode_num;
@@ -299,7 +298,6 @@ int cifs_get_inode_info(struct inode **pinode,
299 } else /* do we need cast or hash to ino? */ 298 } else /* do we need cast or hash to ino? */
300 (*pinode)->i_ino = inode_num; 299 (*pinode)->i_ino = inode_num;
301 } /* else ino incremented to unique num in new_inode*/ 300 } /* else ino incremented to unique num in new_inode*/
302#endif /* CIFS_EXPERIMENTAL */
303 insert_inode_hash(*pinode); 301 insert_inode_hash(*pinode);
304 } 302 }
305 inode = *pinode; 303 inode = *pinode;