Author: sfrench
Date: 2006-08-16 19:51:48 +0000 (Wed, 16 Aug 2006)
New Revision: 72

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=72

Log:
Merge with mainline cifs git tree - picking up Bjoern Jacke's suggestion 
re:allowing disabling listxattr

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/README
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/xattr.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
===================================================================
--- branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES   2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES   2006-08-16 19:51:48 UTC 
(rev 72)
@@ -2,7 +2,11 @@
 ------------
 Do not time out lockw calls when using posix extensions. Do not
 time out requests if server still responding reasonably fast
-on requests on other threads
+on requests on other threads.  Improve POSIX locking emulation,
+(lock cancel now works, and unlock of merged range works even
+to Windows servers now).  Fix oops on mount to lanman servers
+(win9x, os/2 etc.) when null password.  Do not send listxattr
+(SMB to query all EAs) if nouser_xattr specified.
 
 Version 1.44
 ------------

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/README
===================================================================
--- branches/linux-2.6-cifs-git-devel/fs/cifs/README    2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/README    2006-08-16 19:51:48 UTC 
(rev 72)
@@ -408,7 +408,7 @@
   user_xattr    Allow getting and setting user xattrs as OS/2 EAs (extended
                attributes) to the server (default) e.g. via setfattr 
                and getfattr utilities. 
-  nouser_xattr  Do not allow getfattr/setfattr to get/set xattrs 
+  nouser_xattr  Do not allow getfattr/setfattr to get/set/list xattrs 
   mapchars      Translate six of the seven reserved characters (not backslash)
                        *?<>|:
                to the remap range (above 0xF000), which also

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
===================================================================
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-08-16 19:51:48 UTC 
(rev 72)
@@ -477,7 +477,7 @@
                /* BB get server time for time conversions and add
                code to use it and timezone since this is not UTC */    
 
-               if (rsp->EncryptionKeyLength == CIFS_CRYPTO_KEY_SIZE) {
+               if (rsp->EncryptionKeyLength == 
cpu_to_le16(CIFS_CRYPTO_KEY_SIZE)) {
                        memcpy(server->cryptKey, rsp->EncryptionKey,
                                CIFS_CRYPTO_KEY_SIZE);
                } else if (server->secMode & SECMODE_PW_ENCRYPT) {

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
===================================================================
--- branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c 2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c 2006-08-16 19:51:48 UTC 
(rev 72)
@@ -1271,33 +1271,35 @@
 
        read_lock(&GlobalSMBSeslock);
        list_for_each(tmp, &GlobalTreeConnectionList) {
-               cFYI(1, ("Next tcon - "));
+               cFYI(1, ("Next tcon"));
                tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
                if (tcon->ses) {
                        if (tcon->ses->server) {
                                cFYI(1,
-                                    (" old ip addr: %x == new ip %x ?",
+                                    ("old ip addr: %x == new ip %x ?",
                                      tcon->ses->server->addr.sockAddr.sin_addr.
                                      s_addr, new_target_ip_addr));
                                if (tcon->ses->server->addr.sockAddr.sin_addr.
                                    s_addr == new_target_ip_addr) {
-       /* BB lock tcon and server and tcp session and increment use count 
here? */
+       /* BB lock tcon, server and tcp session and increment use count here? */
                                        /* found a match on the TCP session */
                                        /* BB check if reconnection needed */
-                                       cFYI(1,("Matched ip, old UNC: %s == 
new: %s ?",
+                                       cFYI(1,("IP match, old UNC: %s new: %s",
                                              tcon->treeName, uncName));
                                        if (strncmp
                                            (tcon->treeName, uncName,
                                             MAX_TREE_SIZE) == 0) {
                                                cFYI(1,
-                                                    ("Matched UNC, old user: 
%s == new: %s ?",
+                                                    ("and old usr: %s new: %s",
                                                      tcon->treeName, uncName));
                                                if (strncmp
                                                    (tcon->ses->userName,
                                                     userName,
                                                     MAX_USERNAME_SIZE) == 0) {
                                                        
read_unlock(&GlobalSMBSeslock);
-                                                       return tcon;/* also 
matched user (smb session)*/
+                                                       /* matched smb session
+                                                       (user name */
+                                                       return tcon;
                                                }
                                        }
                                }

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c
===================================================================
--- branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c     2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c     2006-08-16 19:51:48 UTC 
(rev 72)
@@ -267,6 +267,10 @@
                        pCifsFile->invalidHandle = FALSE;
                        pCifsFile->closePend     = FALSE;
                        init_MUTEX(&pCifsFile->fh_sem);
+                       init_MUTEX(&pCifsFile->lock_sem);
+                       INIT_LIST_HEAD(&pCifsFile->llist);
+                       atomic_set(&pCifsFile->wrtPending,0);
+
                        /* set the following in open now 
                                pCifsFile->pfile = file; */
                        write_lock(&GlobalSMBSeslock);

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
===================================================================
--- branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c 2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c 2006-08-16 19:51:48 UTC 
(rev 72)
@@ -556,7 +556,7 @@
                FIND_FILE_STANDARD_INFO * pFindData =
                        (FIND_FILE_STANDARD_INFO *)current_entry;
                filename = &pFindData->FileName[0];
-               len = le32_to_cpu(pFindData->FileNameLength);
+               len = pFindData->FileNameLength;
        } else {
                cFYI(1,("Unknown findfirst level 
%d",cfile->srch_inf.info_level));
        }

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/xattr.c
===================================================================
--- branches/linux-2.6-cifs-git-devel/fs/cifs/xattr.c   2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/xattr.c   2006-08-16 19:51:48 UTC 
(rev 72)
@@ -330,11 +330,15 @@
        sb = direntry->d_inode->i_sb;
        if(sb == NULL)
                return -EIO;
-       xid = GetXid();
 
        cifs_sb = CIFS_SB(sb);
        pTcon = cifs_sb->tcon;
 
+       if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
+               return -EOPNOTSUPP;
+
+       xid = GetXid();
+
        full_path = build_path_from_dentry(direntry);
        if(full_path == NULL) {
                FreeXid(xid);

Reply via email to