diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 4173f23a71d9..3766db2bb7f2 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1278,6 +1278,13 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, | |||
1278 | total_read += bytes_read, current_offset += bytes_read) { | 1278 | total_read += bytes_read, current_offset += bytes_read) { |
1279 | current_read_size = min_t(const int, read_size - total_read, | 1279 | current_read_size = min_t(const int, read_size - total_read, |
1280 | cifs_sb->rsize); | 1280 | cifs_sb->rsize); |
1281 | /* For windows me and 9x we do not want to request more | ||
1282 | than it negotiated since it will refuse the read then */ | ||
1283 | if((pTcon->ses) && | ||
1284 | !(pTcon->ses->capabilities & CAP_LARGE_FILES)) { | ||
1285 | current_read_size = min_t(const int, current_read_size, | ||
1286 | pTcon->ses->server->maxBuf - 128); | ||
1287 | } | ||
1281 | rc = -EAGAIN; | 1288 | rc = -EAGAIN; |
1282 | while (rc == -EAGAIN) { | 1289 | while (rc == -EAGAIN) { |
1283 | if ((open_file->invalidHandle) && | 1290 | if ((open_file->invalidHandle) && |