diff options
author | Steve French <sfrench@us.ibm.com> | 2005-12-12 23:53:18 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-12-12 23:53:18 -0500 |
commit | ec637e3ffb6b978143652477c7c5f96c9519b691 (patch) | |
tree | 32533b8f101e1d85b3499050eef29e78480e5cae /fs/cifs/connect.c | |
parent | c89a86bb96307019867d11874ef0b86adaa0598e (diff) |
[CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpages
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 651f3b6cebed..45c9d726c002 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -514,7 +514,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
514 | /* else length ok */ | 514 | /* else length ok */ |
515 | reconnect = 0; | 515 | reconnect = 0; |
516 | 516 | ||
517 | if(pdu_length > MAX_CIFS_HDR_SIZE - 4) { | 517 | if(pdu_length > MAX_CIFS_SMALL_BUFFER_SIZE - 4) { |
518 | isLargeBuf = TRUE; | 518 | isLargeBuf = TRUE; |
519 | memcpy(bigbuf, smallbuf, 4); | 519 | memcpy(bigbuf, smallbuf, 4); |
520 | smb_buffer = bigbuf; | 520 | smb_buffer = bigbuf; |