aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-29 01:41:07 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-29 01:41:07 -0400
commitb8643e1b5253a6a51da5574a55a2f9148e255cfd (patch)
tree7be4a4dc45e83e793f729a69d94b9970d08a2092 /fs/cifs/transport.c
parentc81156dd217818c143a09b6a744e797a04571e99 (diff)
[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 @@
1/* 1/*
2 * fs/cifs/transport.c 2 * fs/cifs/transport.c
3 * 3 *
4 * Copyright (C) International Business Machines Corp., 2002,2004 4 * Copyright (C) International Business Machines Corp., 2002,2005
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * This library is free software; you can redistribute it and/or modify 7 * This library is free software; you can redistribute it and/or modify
@@ -79,7 +79,10 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
79 list_del(&midEntry->qhead); 79 list_del(&midEntry->qhead);
80 atomic_dec(&midCount); 80 atomic_dec(&midCount);
81 spin_unlock(&GlobalMid_Lock); 81 spin_unlock(&GlobalMid_Lock);
82 cifs_buf_release(midEntry->resp_buf); 82 if(midEntry->largeBuf)
83 cifs_buf_release(midEntry->resp_buf);
84 else
85 cifs_small_buf_release(midEntry->resp_buf);
83 mempool_free(midEntry, cifs_mid_poolp); 86 mempool_free(midEntry, cifs_mid_poolp);
84} 87}
85 88