aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2007-08-16 02:49:11 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-09-05 00:51:04 -0400
commit5995cb7d805496362e5af73235145667096fbc6f (patch)
tree2d0817c1a3d1ba6487699e02878c0c029b9fc89f /fs/xfs/quota
parent265c1fac38e37e828df09965406e9cc20bfa3588 (diff)
[XFS] fix nasty quota hashtable allocation bug
This git mod: 77e4635ae191774526ed695482a151ac986f3806 converted to a "greedy" allocation interface, but for the quota hashtables it switched from allocating XFS_QM_HASHSIZE (nr of elements) xfs_dqhash_t's to allocating only XFS_QM_HASHSIZE *bytes* - quite a lot smaller! Then when we converted hsize "back" to nr of elements (the division line) hsize went to 0. This was leading to oopses when running any quota tests on the Fedora 8 test kernel, but the problem has been there for almost a year. SGI-PV: 968837 SGI-Modid: xfs-linux-melb:xfs-kern:29354a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r--fs/xfs/quota/xfs_qm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 2d274b23ade5..6ff0f4de1630 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -120,7 +120,8 @@ xfs_Gqm_init(void)
120 * Initialize the dquot hash tables. 120 * Initialize the dquot hash tables.
121 */ 121 */
122 udqhash = kmem_zalloc_greedy(&hsize, 122 udqhash = kmem_zalloc_greedy(&hsize,
123 XFS_QM_HASHSIZE_LOW, XFS_QM_HASHSIZE_HIGH, 123 XFS_QM_HASHSIZE_LOW * sizeof(xfs_dqhash_t),
124 XFS_QM_HASHSIZE_HIGH * sizeof(xfs_dqhash_t),
124 KM_SLEEP | KM_MAYFAIL | KM_LARGE); 125 KM_SLEEP | KM_MAYFAIL | KM_LARGE);
125 gdqhash = kmem_zalloc(hsize, KM_SLEEP | KM_LARGE); 126 gdqhash = kmem_zalloc(hsize, KM_SLEEP | KM_LARGE);
126 hsize /= sizeof(xfs_dqhash_t); 127 hsize /= sizeof(xfs_dqhash_t);