summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfssvc.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-04 02:16:15 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 07:55:21 -0700
commit44c556000a31e8079cfbb9a42a7edb93ca6b589a (patch)
treecd4ee059c11fb1e30d9ef09d518715d9b329aa8f /fs/nfsd/nfssvc.c
parent6b54dae2b0defb30babb0fe87b13463b9f4b2907 (diff)
downloadlinux-44c556000a31e8079cfbb9a42a7edb93ca6b589a.tar.bz2
[PATCH] knfsd: fix auto-sizing of nfsd request/reply buffers
totalram is measured in pages, not bytes, so PAGE_SHIFT must be used when trying to find 1/4096 of RAM. Cc: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r--fs/nfsd/nfssvc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 0603baad5426..6fa6340a5fb8 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -209,7 +209,7 @@ int nfsd_create_serv(void)
* Of course, this is only a default.
*/
nfsd_max_blksize = NFSSVC_MAXBLKSIZE;
- i.totalram >>= 12;
+ i.totalram <<= PAGE_SHIFT - 12;
while (nfsd_max_blksize > i.totalram &&
nfsd_max_blksize >= 8*1024*2)
nfsd_max_blksize /= 2;