]> err.no Git - linux-2.6/blobdiff - fs/cifs/cifsfs.c
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / fs / cifs / cifsfs.c
index 3d5365b9f5ba3791eafe9e8b9c654dffac0d9d30..8cc23e7d0d5d34e69924e7752e3a816dd6297cfc 100644 (file)
@@ -169,7 +169,8 @@ cifs_put_super(struct super_block *sb)
 static int
 cifs_statfs(struct super_block *sb, struct kstatfs *buf)
 {
-       int xid, rc = -EOPNOTSUPP;
+       int xid; 
+       int rc = -EOPNOTSUPP;
        struct cifs_sb_info *cifs_sb;
        struct cifsTconInfo *pTcon;
 
@@ -181,16 +182,18 @@ cifs_statfs(struct super_block *sb, struct kstatfs *buf)
        buf->f_type = CIFS_MAGIC_NUMBER;
 
        /* instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO */
-       buf->f_namelen = PATH_MAX;      /* PATH_MAX may be too long - it would presumably
-                                          be length of total path, note that some servers may be 
-                                          able to support more than this, but best to be safe
-                                          since Win2k and others can not handle very long filenames */
+       buf->f_namelen = PATH_MAX; /* PATH_MAX may be too long - it would 
+                                     presumably be total path, but note
+                                     that some servers (includinng Samba 3)
+                                     have a shorter maximum path */
        buf->f_files = 0;       /* undefined */
        buf->f_ffree = 0;       /* unlimited */
 
 #ifdef CONFIG_CIFS_EXPERIMENTAL
 /* BB we could add a second check for a QFS Unix capability bit */
-    if (pTcon->ses->capabilities & CAP_UNIX)
+/* BB FIXME check CIFS_POSIX_EXTENSIONS Unix cap first FIXME BB */
+    if ((pTcon->ses->capabilities & CAP_UNIX) && (CIFS_POSIX_EXTENSIONS &
+                       le64_to_cpu(pTcon->fsUnixInfo.Capability)))
            rc = CIFSSMBQFSPosixInfo(xid, pTcon, buf);
 
     /* Only need to call the old QFSInfo if failed
@@ -203,9 +206,10 @@ cifs_statfs(struct super_block *sb, struct kstatfs *buf)
           int f_type;
           __fsid_t f_fsid;
           int f_namelen;  */
-       /* BB get from info put in tcon struct at mount time with call to QFSAttrInfo */
+       /* BB get from info in tcon struct at mount time call to QFSAttrInfo */
        FreeXid(xid);
-       return 0;               /* always return success? what if volume is no longer available? */
+       return 0;               /* always return success? what if volume is no
+                                  longer available? */
 }
 
 static int cifs_permission(struct inode * inode, int mask, struct nameidata *nd)
@@ -599,6 +603,7 @@ struct file_operations cifs_dir_ops = {
 #ifdef CONFIG_CIFS_EXPERIMENTAL
        .dir_notify = cifs_dir_notify,
 #endif /* CONFIG_CIFS_EXPERIMENTAL */
+        .ioctl  = cifs_ioctl,
 };
 
 static void
@@ -830,6 +835,7 @@ static int cifs_oplock_thread(void * dummyarg)
                }
        } while(!signal_pending(current));
        complete_and_exit (&cifs_oplock_exited, 0);
+       oplockThread = NULL;
 }
 
 static int __init