xfs: replace KM_LARGE with explicit vmalloc use
We use the KM_LARGE flag to make kmem_alloc and friends use vmalloc if necessary. As we only need this for a few boot/mount time allocations just switch to explicit vmalloc calls there. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:

committed by
Alex Elder

parent
a14a348bff
commit
bdfb04301f
@@ -1525,8 +1525,8 @@ xfs_alloc_bufhash(
|
||||
|
||||
btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */
|
||||
btp->bt_hashmask = (1 << btp->bt_hashshift) - 1;
|
||||
btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) *
|
||||
sizeof(xfs_bufhash_t), KM_SLEEP | KM_LARGE);
|
||||
btp->bt_hash = kmem_zalloc_large((1 << btp->bt_hashshift) *
|
||||
sizeof(xfs_bufhash_t));
|
||||
for (i = 0; i < (1 << btp->bt_hashshift); i++) {
|
||||
spin_lock_init(&btp->bt_hash[i].bh_lock);
|
||||
INIT_LIST_HEAD(&btp->bt_hash[i].bh_list);
|
||||
@@ -1537,7 +1537,7 @@ STATIC void
|
||||
xfs_free_bufhash(
|
||||
xfs_buftarg_t *btp)
|
||||
{
|
||||
kmem_free(btp->bt_hash);
|
||||
kmem_free_large(btp->bt_hash);
|
||||
btp->bt_hash = NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user