summaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-28 22:41:07 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-28 22:41:07 -0700
commitb8643e1b5253a6a51da5574a55a2f9148e255cfd (patch)
tree7be4a4dc45e83e793f729a69d94b9970d08a2092 /fs/cifs/transport.c
parentc81156dd217818c143a09b6a744e797a04571e99 (diff)
downloadlinux-b8643e1b5253a6a51da5574a55a2f9148e255cfd.tar.gz
linux-b8643e1b5253a6a51da5574a55a2f9148e255cfd.tar.bz2
linux-b8643e1b5253a6a51da5574a55a2f9148e255cfd.zip
[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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index aab62ed46982..f9e16b39898c 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);
}