From: Steve French Date: Wed, 3 Aug 2011 03:17:43 +0000 (+0000) Subject: Revert "cifs: advertise the right receive buffer size to the server" X-Git-Tag: firefly_0821_release~3680^2~4704^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fc05a78efb8e91e884017bb0bc43f690aa5b4dcd;p=firefly-linux-kernel-4.4.55.git Revert "cifs: advertise the right receive buffer size to the server" This reverts commit c4d3396b261473ded6f370edd1e79ba34e089d7e. Problems discovered with readdir to Samba due to not accounting for header size properly with this change --- diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 243d58720513..d3e619692ee0 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -124,8 +124,7 @@ static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB) /* that we use in next few lines */ /* Note that header is initialized to zero in header_assemble */ pSMB->req.AndXCommand = 0xFF; - pSMB->req.MaxBufferSize = cpu_to_le16(min_t(u32, CIFSMaxBufSize - 4, - USHRT_MAX)); + pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq); pSMB->req.VcNumber = get_next_vcnum(ses);