diff options
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 96f7af4ae400..1cc9de44ce86 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -35,18 +35,6 @@ | |||
35 | #define NR_RESERVED_BUFS 32 | 35 | #define NR_RESERVED_BUFS 32 |
36 | 36 | ||
37 | 37 | ||
38 | static void *mp_pool_alloc(gfp_t gfp_flags, void *data) | ||
39 | { | ||
40 | struct multipath_bh *mpb; | ||
41 | mpb = kzalloc(sizeof(*mpb), gfp_flags); | ||
42 | return mpb; | ||
43 | } | ||
44 | |||
45 | static void mp_pool_free(void *mpb, void *data) | ||
46 | { | ||
47 | kfree(mpb); | ||
48 | } | ||
49 | |||
50 | static int multipath_map (multipath_conf_t *conf) | 38 | static int multipath_map (multipath_conf_t *conf) |
51 | { | 39 | { |
52 | int i, disks = conf->raid_disks; | 40 | int i, disks = conf->raid_disks; |
@@ -494,9 +482,8 @@ static int multipath_run (mddev_t *mddev) | |||
494 | } | 482 | } |
495 | mddev->degraded = conf->raid_disks = conf->working_disks; | 483 | mddev->degraded = conf->raid_disks = conf->working_disks; |
496 | 484 | ||
497 | conf->pool = mempool_create(NR_RESERVED_BUFS, | 485 | conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS, |
498 | mp_pool_alloc, mp_pool_free, | 486 | sizeof(struct multipath_bh)); |
499 | NULL); | ||
500 | if (conf->pool == NULL) { | 487 | if (conf->pool == NULL) { |
501 | printk(KERN_ERR | 488 | printk(KERN_ERR |
502 | "multipath: couldn't allocate memory for %s\n", | 489 | "multipath: couldn't allocate memory for %s\n", |