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.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ba8f7868cb23..a6fbea57c4b1 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -49,10 +49,6 @@
49static struct quotactl_ops cifs_quotactl_ops; 49static struct quotactl_ops cifs_quotactl_ops;
50#endif /* QUOTA */ 50#endif /* QUOTA */
51 51
52#ifdef CONFIG_CIFS_EXPERIMENTAL
53extern struct export_operations cifs_export_ops;
54#endif /* EXPERIMENTAL */
55
56int cifsFYI = 0; 52int cifsFYI = 0;
57int cifsERROR = 1; 53int cifsERROR = 1;
58int traceSMB = 0; 54int traceSMB = 0;
@@ -240,9 +236,9 @@ static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd)
240 236
241 cifs_sb = CIFS_SB(inode->i_sb); 237 cifs_sb = CIFS_SB(inode->i_sb);
242 238
243 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) { 239 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM)
244 return 0; 240 return 0;
245 } else /* file mode might have been restricted at mount time 241 else /* file mode might have been restricted at mount time
246 on the client (above and beyond ACL on servers) for 242 on the client (above and beyond ACL on servers) for
247 servers which do not support setting and viewing mode bits, 243 servers which do not support setting and viewing mode bits,
248 so allowing client to check permissions is useful */ 244 so allowing client to check permissions is useful */
@@ -312,15 +308,15 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
312 seq_printf(s, ",domain=%s", 308 seq_printf(s, ",domain=%s",
313 cifs_sb->tcon->ses->domainName); 309 cifs_sb->tcon->ses->domainName);
314 } 310 }
311 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) ||
312 !(cifs_sb->tcon->unix_ext))
313 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
314 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
315 !(cifs_sb->tcon->unix_ext))
316 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
315 } 317 }
316 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) 318 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
317 seq_printf(s, ",posixpaths"); 319 seq_printf(s, ",posixpaths");
318 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) ||
319 !(cifs_sb->tcon->unix_ext))
320 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
321 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
322 !(cifs_sb->tcon->unix_ext))
323 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
324 seq_printf(s, ",rsize=%d", cifs_sb->rsize); 320 seq_printf(s, ",rsize=%d", cifs_sb->rsize);
325 seq_printf(s, ",wsize=%d", cifs_sb->wsize); 321 seq_printf(s, ",wsize=%d", cifs_sb->wsize);
326 } 322 }
@@ -346,7 +342,7 @@ int cifs_xquota_set(struct super_block *sb, int quota_type, qid_t qid,
346 if (pTcon) { 342 if (pTcon) {
347 cFYI(1, ("set type: 0x%x id: %d", quota_type, qid)); 343 cFYI(1, ("set type: 0x%x id: %d", quota_type, qid));
348 } else { 344 } else {
349 return -EIO; 345 rc = -EIO;
350 } 346 }
351 347
352 FreeXid(xid); 348 FreeXid(xid);
@@ -716,7 +712,7 @@ static int
716cifs_init_inodecache(void) 712cifs_init_inodecache(void)
717{ 713{
718 cifs_inode_cachep = kmem_cache_create("cifs_inode_cache", 714 cifs_inode_cachep = kmem_cache_create("cifs_inode_cache",
719 sizeof (struct cifsInodeInfo), 715 sizeof(struct cifsInodeInfo),
720 0, (SLAB_RECLAIM_ACCOUNT| 716 0, (SLAB_RECLAIM_ACCOUNT|
721 SLAB_MEM_SPREAD), 717 SLAB_MEM_SPREAD),
722 cifs_init_once); 718 cifs_init_once);
@@ -816,8 +812,8 @@ static int
816cifs_init_mids(void) 812cifs_init_mids(void)
817{ 813{
818 cifs_mid_cachep = kmem_cache_create("cifs_mpx_ids", 814 cifs_mid_cachep = kmem_cache_create("cifs_mpx_ids",
819 sizeof (struct mid_q_entry), 0, 815 sizeof(struct mid_q_entry), 0,
820 SLAB_HWCACHE_ALIGN, NULL); 816 SLAB_HWCACHE_ALIGN, NULL);
821 if (cifs_mid_cachep == NULL) 817 if (cifs_mid_cachep == NULL)
822 return -ENOMEM; 818 return -ENOMEM;
823 819
@@ -829,8 +825,8 @@ cifs_init_mids(void)
829 } 825 }
830 826
831 cifs_oplock_cachep = kmem_cache_create("cifs_oplock_structs", 827 cifs_oplock_cachep = kmem_cache_create("cifs_oplock_structs",
832 sizeof (struct oplock_q_entry), 0, 828 sizeof(struct oplock_q_entry), 0,
833 SLAB_HWCACHE_ALIGN, NULL); 829 SLAB_HWCACHE_ALIGN, NULL);
834 if (cifs_oplock_cachep == NULL) { 830 if (cifs_oplock_cachep == NULL) {
835 mempool_destroy(cifs_mid_poolp); 831 mempool_destroy(cifs_mid_poolp);
836 kmem_cache_destroy(cifs_mid_cachep); 832 kmem_cache_destroy(cifs_mid_cachep);
@@ -882,7 +878,8 @@ static int cifs_oplock_thread(void *dummyarg)
882 the call */ 878 the call */
883 /* mutex_lock(&inode->i_mutex);*/ 879 /* mutex_lock(&inode->i_mutex);*/
884 if (S_ISREG(inode->i_mode)) { 880 if (S_ISREG(inode->i_mode)) {
885 rc = filemap_fdatawrite(inode->i_mapping); 881 rc =
882 filemap_fdatawrite(inode->i_mapping);
886 if (CIFS_I(inode)->clientCanCacheRead 883 if (CIFS_I(inode)->clientCanCacheRead
887 == 0) { 884 == 0) {
888 filemap_fdatawait(inode->i_mapping); 885 filemap_fdatawait(inode->i_mapping);
@@ -907,8 +904,7 @@ static int cifs_oplock_thread(void *dummyarg)
907 0 /* len */ , 0 /* offset */, 0, 904 0 /* len */ , 0 /* offset */, 0,
908 0, LOCKING_ANDX_OPLOCK_RELEASE, 905 0, LOCKING_ANDX_OPLOCK_RELEASE,
909 0 /* wait flag */); 906 0 /* wait flag */);
910 cFYI(1, 907 cFYI(1, ("Oplock release rc = %d", rc));
911 ("Oplock release rc = %d ", rc));
912 } 908 }
913 } else 909 } else
914 spin_unlock(&GlobalMid_Lock); 910 spin_unlock(&GlobalMid_Lock);