]> git.hungrycats.org Git - linux/commitdiff
retry socket write on EAGAIN. Fix oops in write when tcp session dead.
authorSteve French <stevef@stevef95.austin.ibm.com>
Thu, 21 Aug 2003 08:08:44 +0000 (01:08 -0700)
committerSteve French <cifs.adm@hostme.bitkeeper.com>
Thu, 21 Aug 2003 08:08:44 +0000 (01:08 -0700)
fs/cifs/CHANGES
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/transport.c

index 2a58939fb9ba46591a41d0d38281eeaabcbabc4a..1905748d3b584853a90179cba95f51d9da067985 100644 (file)
@@ -1,3 +1,13 @@
+Version 0.89
+------------
+Fix oops on write to dead tcp session.
+
+Version 0.88
+------------
+Fix non-POSIX behavior on rename of open file and delete of open file by taking 
+advantage of trans2 SetFileInfo rename facility if available on target server.
+Retry on ENOSPC and EAGAIN socket errors.
+
 Version 0.87
 ------------
 Fix oops on big endian readdir.  Set blksize to be even power of two (2**blkbits) to fix
index 202caf6f5367ad267a25eea784bcd65a51667dc5..9643932c9df20ad0a47c19ecd46d1bf69fa2aec1 100644 (file)
@@ -526,6 +526,10 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon,
        if (rc)
                return rc;
 
+        /* tcon and ses pointer are checked in smb_init */
+        if (tcon->ses->server == NULL)
+                return -ECONNABORTED;
+
        pSMB->AndXCommand = 0xFF;       /* none */
        pSMB->Fid = netfid;
        pSMB->OffsetLow = cpu_to_le32(lseek & 0xFFFFFFFF);
@@ -584,6 +588,9 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
                      (void **) &pSMBr);
        if (rc)
                return rc;
+       /* tcon and ses pointer are checked in smb_init */
+       if (tcon->ses->server == NULL)
+               return -ECONNABORTED;
 
        pSMB->AndXCommand = 0xFF;       /* none */
        pSMB->Fid = netfid;
index ea5f342e2386dd45f36761b78eb4fd8a8c663238..81151b42569439d6e3cb4ae190d105456e1daa55 100644 (file)
@@ -233,9 +233,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
                                    (checkSMBhdr
                                     (smb_buffer, smb_buffer->Mid))) {
                                        cERROR(1,
-                                              (KERN_ERR
-                                               "Invalid size or format for SMB found with length %d and pdu_lenght %d",
+                                           ("Invalid size or format for SMB found with length %d and pdu_lenght %d",
                                                length, pdu_length));
+                                       cifs_dump_mem("Received Data is: ",temp,sizeof(struct smb_hdr));
                                        /* BB fix by finding next smb signature - and reading off data until next smb ? BB */
 
                                        /* BB add reconnect here */
index ba00aa2672e33fcd2645e2644ae6194740a4a25c..7795f24d90b4cb6e8a65f1d2adb226e1b9cf24c9 100644 (file)
@@ -51,7 +51,6 @@ build_path_from_dentry(struct dentry *direntry)
 
        for (temp = direntry; !IS_ROOT(temp);) {
                namelen += (1 + temp->d_name.len);
-               cFYI(1, (" len %d ", namelen));
                temp = temp->d_parent;
        }
        namelen += 1;           /* allow for trailing null */
index 7d5a07eb208b6fbae2627379874acc5037bfec82..1e037749e8f4a31a5fd107f5d6922034b4894568 100644 (file)
@@ -169,7 +169,7 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
        temp_fs = get_fs();     /* we must turn off socket api parm checking */
        set_fs(get_ds());
        rc = sock_sendmsg(ssocket, &smb_msg, smb_buf_length + 4);
-       while(rc == -ENOSPC) {
+       while((rc == -ENOSPC) || (rc == -EAGAIN)) {
                schedule_timeout(HZ/2);
                rc = sock_sendmsg(ssocket, &smb_msg, smb_buf_length + 4);
        }