aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-10-11 06:41:32 -0400
committerSteve French <smfrench@gmail.com>2011-10-13 00:41:32 -0400
commitc974befa402b5eb2ed115b3083b5a46a4be85a9f (patch)
tree88c5835981e1e306248b9f9c4662510ff5b8d5e1 /fs/cifs/file.c
parentf3a6a60e4c3ac83370c620dbbd08d2a418b9364d (diff)
cifs: untangle server->maxBuf and CIFSMaxBufSize
server->maxBuf is the maximum SMB size (including header) that the server can handle. CIFSMaxBufSize is the maximum amount of data (sans header) that the client can handle. Currently maxBuf is being capped at CIFSMaxBufSize + the max headers size, and the two values are used somewhat interchangeably in the code. This makes little sense as these two values are not related at all. Separate them and make sure the code uses the right values in the right places. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 9f41a10523a1..fd57165f55fa 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1868,7 +1868,7 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
1868 if ((pTcon->ses) && 1868 if ((pTcon->ses) &&
1869 !(pTcon->ses->capabilities & CAP_LARGE_FILES)) { 1869 !(pTcon->ses->capabilities & CAP_LARGE_FILES)) {
1870 current_read_size = min_t(const int, current_read_size, 1870 current_read_size = min_t(const int, current_read_size,
1871 pTcon->ses->server->maxBuf - 128); 1871 CIFSMaxBufSize);
1872 } 1872 }
1873 rc = -EAGAIN; 1873 rc = -EAGAIN;
1874 while (rc == -EAGAIN) { 1874 while (rc == -EAGAIN) {