提交 94443f43 编写于 作者: P Pavel Shilovsky 提交者: Steve French

CIFS: Fix incorrect max RFC1002 write size value

..the length field has only 17 bits.

Cc: <stable@kernel.org>
Acked-by: NJeff Layton <jlayton@samba.org>
Signed-off-by: NPavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: NSteve French <smfrench@gmail.com>
上级 a52c1eb7
......@@ -2809,10 +2809,10 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
/*
* When the server doesn't allow large posix writes, only allow a wsize of
* 128k minus the size of the WRITE_AND_X header. That allows for a write up
* 2^17-1 minus the size of the WRITE_AND_X header. That allows for a write up
* to the maximum size described by RFC1002.
*/
#define CIFS_MAX_RFC1002_WSIZE (128 * 1024 - sizeof(WRITE_REQ) + 4)
#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
/*
* The default wsize is 1M. find_get_pages seems to return a maximum of 256
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册