commit | ec637e3ffb6b978143652477c7c5f96c9519b691 | [log] [tgz] |
---|---|---|
author | Steve French <sfrench@us.ibm.com> | Mon Dec 12 20:53:18 2005 -0800 |
committer | Steve French <sfrench@us.ibm.com> | Mon Dec 12 20:53:18 2005 -0800 |
tree | 32533b8f101e1d85b3499050eef29e78480e5cae | |
parent | c89a86bb96307019867d11874ef0b86adaa0598e [diff] [blame] |
[CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpages Signed-off-by: Steve French <sfrench@us.ibm.com>
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 651f3b6..45c9d72 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c
@@ -514,7 +514,7 @@ /* else length ok */ reconnect = 0; - if(pdu_length > MAX_CIFS_HDR_SIZE - 4) { + if(pdu_length > MAX_CIFS_SMALL_BUFFER_SIZE - 4) { isLargeBuf = TRUE; memcpy(bigbuf, smallbuf, 4); smb_buffer = bigbuf;