From bb0b8c1600b52de8379afa047926268e08ea6245 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 15 Sep 2005 23:06:38 -0700 Subject: [PATCH] --- yaml --- r: 12050 b: refs/heads/master c: f9f5c81769f88bccd177423a30a7d30461754c39 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/file.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index efc69369b88b..446b7e90cedf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eafe87012159a40a1e7151cc576e99a22aea2f0b +refs/heads/master: f9f5c81769f88bccd177423a30a7d30461754c39 diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index 4173f23a71d9..3766db2bb7f2 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -1278,6 +1278,13 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, total_read += bytes_read, current_offset += bytes_read) { current_read_size = min_t(const int, read_size - total_read, cifs_sb->rsize); + /* For windows me and 9x we do not want to request more + than it negotiated since it will refuse the read then */ + if((pTcon->ses) && + !(pTcon->ses->capabilities & CAP_LARGE_FILES)) { + current_read_size = min_t(const int, current_read_size, + pTcon->ses->server->maxBuf - 128); + } rc = -EAGAIN; while (rc == -EAGAIN) { if ((open_file->invalidHandle) &&