aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_qm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/quota/xfs_qm.c')
-rw-r--r--fs/xfs/quota/xfs_qm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 3f86c7c04648..8b2c6cf2c849 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -112,17 +112,16 @@ xfs_Gqm_init(void)
112{ 112{
113 xfs_dqhash_t *udqhash, *gdqhash; 113 xfs_dqhash_t *udqhash, *gdqhash;
114 xfs_qm_t *xqm; 114 xfs_qm_t *xqm;
115 uint i, hsize, flags = KM_SLEEP | KM_MAYFAIL | KM_LARGE; 115 uint i, hsize;
116 116
117 /* 117 /*
118 * Initialize the dquot hash tables. 118 * Initialize the dquot hash tables.
119 */ 119 */
120 hsize = XFS_QM_HASHSIZE_HIGH; 120 udqhash = kmem_zalloc_greedy(&hsize,
121 while (!(udqhash = kmem_zalloc(hsize * sizeof(*udqhash), flags))) { 121 XFS_QM_HASHSIZE_LOW, XFS_QM_HASHSIZE_HIGH,
122 if ((hsize >>= 1) <= XFS_QM_HASHSIZE_LOW) 122 KM_SLEEP | KM_MAYFAIL | KM_LARGE);
123 flags = KM_SLEEP; 123 gdqhash = kmem_zalloc(hsize, KM_SLEEP | KM_LARGE);
124 } 124 hsize /= sizeof(xfs_dqhash_t);
125 gdqhash = kmem_zalloc(hsize * sizeof(*gdqhash), KM_SLEEP | KM_LARGE);
126 ndquot = hsize << 8; 125 ndquot = hsize << 8;
127 126
128 xqm = kmem_zalloc(sizeof(xfs_qm_t), KM_SLEEP); 127 xqm = kmem_zalloc(sizeof(xfs_qm_t), KM_SLEEP);