aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index e1c18aa1d712..f8ffaee20ff8 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -89,16 +89,6 @@ int bitmap_active(struct bitmap *bitmap)
89} 89}
90 90
91#define WRITE_POOL_SIZE 256 91#define WRITE_POOL_SIZE 256
92/* mempool for queueing pending writes on the bitmap file */
93static void *write_pool_alloc(gfp_t gfp_flags, void *data)
94{
95 return kmalloc(sizeof(struct page_list), gfp_flags);
96}
97
98static void write_pool_free(void *ptr, void *data)
99{
100 kfree(ptr);
101}
102 92
103/* 93/*
104 * just a placeholder - calls kmalloc for bitmap pages 94 * just a placeholder - calls kmalloc for bitmap pages
@@ -1564,8 +1554,8 @@ int bitmap_create(mddev_t *mddev)
1564 spin_lock_init(&bitmap->write_lock); 1554 spin_lock_init(&bitmap->write_lock);
1565 INIT_LIST_HEAD(&bitmap->complete_pages); 1555 INIT_LIST_HEAD(&bitmap->complete_pages);
1566 init_waitqueue_head(&bitmap->write_wait); 1556 init_waitqueue_head(&bitmap->write_wait);
1567 bitmap->write_pool = mempool_create(WRITE_POOL_SIZE, write_pool_alloc, 1557 bitmap->write_pool = mempool_create_kmalloc_pool(WRITE_POOL_SIZE,
1568 write_pool_free, NULL); 1558 sizeof(struct page_list));
1569 err = -ENOMEM; 1559 err = -ENOMEM;
1570 if (!bitmap->write_pool) 1560 if (!bitmap->write_pool)
1571 goto error; 1561 goto error;