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.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 5082fce3c566..8cc23e7d0d5d 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -169,7 +169,8 @@ cifs_put_super(struct super_block *sb)
169static int 169static int
170cifs_statfs(struct super_block *sb, struct kstatfs *buf) 170cifs_statfs(struct super_block *sb, struct kstatfs *buf)
171{ 171{
172 int xid, rc = -EOPNOTSUPP; 172 int xid;
173 int rc = -EOPNOTSUPP;
173 struct cifs_sb_info *cifs_sb; 174 struct cifs_sb_info *cifs_sb;
174 struct cifsTconInfo *pTcon; 175 struct cifsTconInfo *pTcon;
175 176
@@ -181,31 +182,34 @@ cifs_statfs(struct super_block *sb, struct kstatfs *buf)
181 buf->f_type = CIFS_MAGIC_NUMBER; 182 buf->f_type = CIFS_MAGIC_NUMBER;
182 183
183 /* instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO */ 184 /* instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO */
184 buf->f_namelen = PATH_MAX; /* PATH_MAX may be too long - it would presumably 185 buf->f_namelen = PATH_MAX; /* PATH_MAX may be too long - it would
185 be length of total path, note that some servers may be 186 presumably be total path, but note
186 able to support more than this, but best to be safe 187 that some servers (includinng Samba 3)
187 since Win2k and others can not handle very long filenames */ 188 have a shorter maximum path */
188 buf->f_files = 0; /* undefined */ 189 buf->f_files = 0; /* undefined */
189 buf->f_ffree = 0; /* unlimited */ 190 buf->f_ffree = 0; /* unlimited */
190 191
191#ifdef CONFIG_CIFS_EXPERIMENTAL 192#ifdef CONFIG_CIFS_EXPERIMENTAL
192/* BB we could add a second check for a QFS Unix capability bit */ 193/* BB we could add a second check for a QFS Unix capability bit */
193 if (pTcon->ses->capabilities & CAP_UNIX) 194/* BB FIXME check CIFS_POSIX_EXTENSIONS Unix cap first FIXME BB */
194 rc = CIFSSMBQFSPosixInfo(xid, pTcon, buf, cifs_sb->local_nls); 195 if ((pTcon->ses->capabilities & CAP_UNIX) && (CIFS_POSIX_EXTENSIONS &
196 le64_to_cpu(pTcon->fsUnixInfo.Capability)))
197 rc = CIFSSMBQFSPosixInfo(xid, pTcon, buf);
195 198
196 /* Only need to call the old QFSInfo if failed 199 /* Only need to call the old QFSInfo if failed
197 on newer one */ 200 on newer one */
198 if(rc) 201 if(rc)
199#endif /* CIFS_EXPERIMENTAL */ 202#endif /* CIFS_EXPERIMENTAL */
200 rc = CIFSSMBQFSInfo(xid, pTcon, buf, cifs_sb->local_nls); 203 rc = CIFSSMBQFSInfo(xid, pTcon, buf);
201 204
202 /* 205 /*
203 int f_type; 206 int f_type;
204 __fsid_t f_fsid; 207 __fsid_t f_fsid;
205 int f_namelen; */ 208 int f_namelen; */
206 /* BB get from info put in tcon struct at mount time with call to QFSAttrInfo */ 209 /* BB get from info in tcon struct at mount time call to QFSAttrInfo */
207 FreeXid(xid); 210 FreeXid(xid);
208 return 0; /* always return success? what if volume is no longer available? */ 211 return 0; /* always return success? what if volume is no
212 longer available? */
209} 213}
210 214
211static int cifs_permission(struct inode * inode, int mask, struct nameidata *nd) 215static int cifs_permission(struct inode * inode, int mask, struct nameidata *nd)
@@ -559,6 +563,10 @@ struct file_operations cifs_file_ops = {
559 .flush = cifs_flush, 563 .flush = cifs_flush,
560 .mmap = cifs_file_mmap, 564 .mmap = cifs_file_mmap,
561 .sendfile = generic_file_sendfile, 565 .sendfile = generic_file_sendfile,
566#ifdef CONFIG_CIFS_POSIX
567 .ioctl = cifs_ioctl,
568#endif /* CONFIG_CIFS_POSIX */
569
562#ifdef CONFIG_CIFS_EXPERIMENTAL 570#ifdef CONFIG_CIFS_EXPERIMENTAL
563 .readv = generic_file_readv, 571 .readv = generic_file_readv,
564 .writev = generic_file_writev, 572 .writev = generic_file_writev,
@@ -579,6 +587,10 @@ struct file_operations cifs_file_direct_ops = {
579 .fsync = cifs_fsync, 587 .fsync = cifs_fsync,
580 .flush = cifs_flush, 588 .flush = cifs_flush,
581 .sendfile = generic_file_sendfile, /* BB removeme BB */ 589 .sendfile = generic_file_sendfile, /* BB removeme BB */
590#ifdef CONFIG_CIFS_POSIX
591 .ioctl = cifs_ioctl,
592#endif /* CONFIG_CIFS_POSIX */
593
582#ifdef CONFIG_CIFS_EXPERIMENTAL 594#ifdef CONFIG_CIFS_EXPERIMENTAL
583 .dir_notify = cifs_dir_notify, 595 .dir_notify = cifs_dir_notify,
584#endif /* CONFIG_CIFS_EXPERIMENTAL */ 596#endif /* CONFIG_CIFS_EXPERIMENTAL */
@@ -591,6 +603,7 @@ struct file_operations cifs_dir_ops = {
591#ifdef CONFIG_CIFS_EXPERIMENTAL 603#ifdef CONFIG_CIFS_EXPERIMENTAL
592 .dir_notify = cifs_dir_notify, 604 .dir_notify = cifs_dir_notify,
593#endif /* CONFIG_CIFS_EXPERIMENTAL */ 605#endif /* CONFIG_CIFS_EXPERIMENTAL */
606 .ioctl = cifs_ioctl,
594}; 607};
595 608
596static void 609static void
@@ -822,6 +835,7 @@ static int cifs_oplock_thread(void * dummyarg)
822 } 835 }
823 } while(!signal_pending(current)); 836 } while(!signal_pending(current));
824 complete_and_exit (&cifs_oplock_exited, 0); 837 complete_and_exit (&cifs_oplock_exited, 0);
838 oplockThread = NULL;
825} 839}
826 840
827static int __init 841static int __init