Gulp ... call kmem_malloc() without Giant.

This commit is contained in:
Alan Cox 2003-07-26 03:55:32 +00:00
parent abe9725e8c
commit 0c1a133f56
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118040

View File

@ -2038,13 +2038,7 @@ uma_large_malloc(int size, int wait)
if (slab == NULL)
return (NULL);
/* XXX: kmem_malloc panics if Giant isn't held and sleep allowed */
if ((wait & M_NOWAIT) == 0 && !mtx_owned(&Giant)) {
mtx_lock(&Giant);
mem = page_alloc(NULL, size, &flags, wait);
mtx_unlock(&Giant);
} else
mem = page_alloc(NULL, size, &flags, wait);
mem = page_alloc(NULL, size, &flags, wait);
if (mem) {
vsetslab((vm_offset_t)mem, slab);
slab->us_data = mem;