Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a97468024fb5b6eccee2a67a7796485c829343a
Commit:     2a97468024fb5b6eccee2a67a7796485c829343a
Parent:     f7a44eadd5a03b8455c7caab402ce96811c6903d
Author:     Petr Tesarik <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 20 02:24:08 2007 +0000
Committer:  Steve French <[EMAIL PROTECTED]>
CommitDate: Tue Nov 20 02:24:08 2007 +0000

    [CIFS] Fix spurious reconnect on 2nd peek from read of SMB length
    
    When retrying kernel_recvmsg() because of a short read, check returned
    length against the remaining length, not against total length. This
    avoids unneeded session reconnects which would otherwise occur when
    kernel_recvmsg() finally returns zero when asked to read zero bytes.
    
    Signed-off-by: Petr Tesarik <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
    Signed-off-by: Steve French <[EMAIL PROTECTED]>
---
 fs/cifs/connect.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index c4b32b7..fd9147c 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -438,9 +438,9 @@ incomplete_rcv:
                        csocket = server->ssocket;
                        wake_up(&server->response_q);
                        continue;
-               } else if (length < 4) {
-                       cFYI(1, ("less than four bytes received (%d bytes)",
-                             length));
+               } else if (length < pdu_length) {
+                       cFYI(1, ("requested %d bytes but only got %d bytes",
+                                 pdu_length, length));
                        pdu_length -= length;
                        msleep(1);
                        goto incomplete_rcv;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to