aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index e8287c4c6eb3..faba4d69fe91 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * fs/cifs/cifsfs.c 2 * fs/cifs/cifsfs.c
3 * 3 *
4 * Copyright (C) International Business Machines Corp., 2002,2004 4 * Copyright (C) International Business Machines Corp., 2002,2007
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * Common Internet FileSystem (CIFS) client 7 * Common Internet FileSystem (CIFS) client
@@ -47,7 +47,11 @@
47 47
48#ifdef CONFIG_CIFS_QUOTA 48#ifdef CONFIG_CIFS_QUOTA
49static struct quotactl_ops cifs_quotactl_ops; 49static struct quotactl_ops cifs_quotactl_ops;
50#endif 50#endif /* QUOTA */
51
52#ifdef CONFIG_CIFS_EXPERIMENTAL
53extern struct export_operations cifs_export_ops;
54#endif /* EXPERIMENTAL */
51 55
52int cifsFYI = 0; 56int cifsFYI = 0;
53int cifsERROR = 1; 57int cifsERROR = 1;
@@ -62,8 +66,8 @@ unsigned int extended_security = CIFSSEC_DEF;
62unsigned int sign_CIFS_PDUs = 1; 66unsigned int sign_CIFS_PDUs = 1;
63extern struct task_struct * oplockThread; /* remove sparse warning */ 67extern struct task_struct * oplockThread; /* remove sparse warning */
64struct task_struct * oplockThread = NULL; 68struct task_struct * oplockThread = NULL;
65extern struct task_struct * dnotifyThread; /* remove sparse warning */ 69/* extern struct task_struct * dnotifyThread; remove sparse warning */
66struct task_struct * dnotifyThread = NULL; 70static struct task_struct * dnotifyThread = NULL;
67static const struct super_operations cifs_super_ops; 71static const struct super_operations cifs_super_ops;
68unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; 72unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
69module_param(CIFSMaxBufSize, int, 0); 73module_param(CIFSMaxBufSize, int, 0);
@@ -91,8 +95,9 @@ cifs_read_super(struct super_block *sb, void *data,
91 struct inode *inode; 95 struct inode *inode;
92 struct cifs_sb_info *cifs_sb; 96 struct cifs_sb_info *cifs_sb;
93 int rc = 0; 97 int rc = 0;
94 98
95 sb->s_flags |= MS_NODIRATIME; /* and probably even noatime */ 99 /* BB should we make this contingent on mount parm? */
100 sb->s_flags |= MS_NODIRATIME | MS_NOATIME;
96 sb->s_fs_info = kzalloc(sizeof(struct cifs_sb_info),GFP_KERNEL); 101 sb->s_fs_info = kzalloc(sizeof(struct cifs_sb_info),GFP_KERNEL);
97 cifs_sb = CIFS_SB(sb); 102 cifs_sb = CIFS_SB(sb);
98 if(cifs_sb == NULL) 103 if(cifs_sb == NULL)
@@ -109,6 +114,10 @@ cifs_read_super(struct super_block *sb, void *data,
109 114
110 sb->s_magic = CIFS_MAGIC_NUMBER; 115 sb->s_magic = CIFS_MAGIC_NUMBER;
111 sb->s_op = &cifs_super_ops; 116 sb->s_op = &cifs_super_ops;
117#ifdef CONFIG_CIFS_EXPERIMENTAL
118 if(experimEnabled != 0)
119 sb->s_export_op = &cifs_export_ops;
120#endif /* EXPERIMENTAL */
112/* if(cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512) 121/* if(cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512)
113 sb->s_blocksize = cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */ 122 sb->s_blocksize = cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */
114#ifdef CONFIG_CIFS_QUOTA 123#ifdef CONFIG_CIFS_QUOTA
@@ -258,7 +267,10 @@ cifs_alloc_inode(struct super_block *sb)
258 cifs_inode->clientCanCacheRead = FALSE; 267 cifs_inode->clientCanCacheRead = FALSE;
259 cifs_inode->clientCanCacheAll = FALSE; 268 cifs_inode->clientCanCacheAll = FALSE;
260 cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ 269 cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */
261 cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME; 270
271 /* Can not set i_flags here - they get immediately overwritten
272 to zero by the VFS */
273/* cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;*/
262 INIT_LIST_HEAD(&cifs_inode->openFileList); 274 INIT_LIST_HEAD(&cifs_inode->openFileList);
263 return &cifs_inode->vfs_inode; 275 return &cifs_inode->vfs_inode;
264} 276}
@@ -283,6 +295,7 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
283 295
284 if (cifs_sb) { 296 if (cifs_sb) {
285 if (cifs_sb->tcon) { 297 if (cifs_sb->tcon) {
298/* BB add prepath to mount options displayed */
286 seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName); 299 seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName);
287 if (cifs_sb->tcon->ses) { 300 if (cifs_sb->tcon->ses) {
288 if (cifs_sb->tcon->ses->userName) 301 if (cifs_sb->tcon->ses->userName)