aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2011-10-07 10:57:45 -0400
committerSteve French <smfrench@gmail.com>2011-10-13 16:20:14 -0400
commit94443f43404239c2a6dc4252a7cb9e77f5b1eb6e (patch)
tree4f74b29aa7de58d9e53b37c111124ce201eed47d /fs
parenta52c1eb7ae79f0a11511d49cfc00d2f9e576abea (diff)
CIFS: Fix incorrect max RFC1002 write size value
..the length field has only 17 bits. Cc: <stable@kernel.org> Acked-by: Jeff Layton <jlayton@samba.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index ff47c1842bec..82bc0d27e495 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2809,10 +2809,10 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
2809 2809
2810/* 2810/*
2811 * When the server doesn't allow large posix writes, only allow a wsize of 2811 * When the server doesn't allow large posix writes, only allow a wsize of
2812 * 128k minus the size of the WRITE_AND_X header. That allows for a write up 2812 * 2^17-1 minus the size of the WRITE_AND_X header. That allows for a write up
2813 * to the maximum size described by RFC1002. 2813 * to the maximum size described by RFC1002.
2814 */ 2814 */
2815#define CIFS_MAX_RFC1002_WSIZE (128 * 1024 - sizeof(WRITE_REQ) + 4) 2815#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
2816 2816
2817/* 2817/*
2818 * The default wsize is 1M. find_get_pages seems to return a maximum of 256 2818 * The default wsize is 1M. find_get_pages seems to return a maximum of 256