diff options
author | Steve French <smfrench@austin.rr.com> | 2005-04-28 22:41:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-28 22:41:07 -0700 |
commit | b8643e1b5253a6a51da5574a55a2f9148e255cfd (patch) | |
tree | 7be4a4dc45e83e793f729a69d94b9970d08a2092 /fs/cifs/transport.c | |
parent | c81156dd217818c143a09b6a744e797a04571e99 (diff) | |
download | kernel_samsung_smdk4412-b8643e1b5253a6a51da5574a55a2f9148e255cfd.zip kernel_samsung_smdk4412-b8643e1b5253a6a51da5574a55a2f9148e255cfd.tar.gz kernel_samsung_smdk4412-b8643e1b5253a6a51da5574a55a2f9148e255cfd.tar.bz2 |
[PATCH] cifs: Do not use large smb buffers in response path
unless response is larger than 256 bytes. This cuts more than 1/3 of
the large memory allocations that cifs does and should be a huge help to
memory pressure under stress.
Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index aab62ed..f9e16b3 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -1,7 +1,7 @@ /* * fs/cifs/transport.c * - * Copyright (C) International Business Machines Corp., 2002,2004 + * Copyright (C) International Business Machines Corp., 2002,2005 * Author(s): Steve French (sfrench@us.ibm.com) * * This library is free software; you can redistribute it and/or modify @@ -79,7 +79,10 @@ DeleteMidQEntry(struct mid_q_entry *midEntry) list_del(&midEntry->qhead); atomic_dec(&midCount); spin_unlock(&GlobalMid_Lock); - cifs_buf_release(midEntry->resp_buf); + if(midEntry->largeBuf) + cifs_buf_release(midEntry->resp_buf); + else + cifs_small_buf_release(midEntry->resp_buf); mempool_free(midEntry, cifs_mid_poolp); } |