From 466c24bce3134017c3b61f2c42bf32783d6a1ff7 Mon Sep 17 00:00:00 2001 From: Matthew Dobson Date: Sun, 26 Mar 2006 01:37:48 -0800 Subject: [PATCH] --- yaml --- r: 24077 b: refs/heads/master c: 26b6e051bc36b968a0b5ac96903b99e050d20b87 h: refs/heads/master i: 24075: 74ecc146f27c57c4aab8b146a7296782595899d7 v: v3 --- [refs] | 2 +- trunk/drivers/md/multipath.c | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 3d9136385b17..17781fade060 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f183323d3822dee4d7b3147a59b6e8987fe201e0 +refs/heads/master: 26b6e051bc36b968a0b5ac96903b99e050d20b87 diff --git a/trunk/drivers/md/multipath.c b/trunk/drivers/md/multipath.c index 96f7af4ae400..1cc9de44ce86 100644 --- a/trunk/drivers/md/multipath.c +++ b/trunk/drivers/md/multipath.c @@ -35,18 +35,6 @@ #define NR_RESERVED_BUFS 32 -static void *mp_pool_alloc(gfp_t gfp_flags, void *data) -{ - struct multipath_bh *mpb; - mpb = kzalloc(sizeof(*mpb), gfp_flags); - return mpb; -} - -static void mp_pool_free(void *mpb, void *data) -{ - kfree(mpb); -} - static int multipath_map (multipath_conf_t *conf) { int i, disks = conf->raid_disks; @@ -494,9 +482,8 @@ static int multipath_run (mddev_t *mddev) } mddev->degraded = conf->raid_disks = conf->working_disks; - conf->pool = mempool_create(NR_RESERVED_BUFS, - mp_pool_alloc, mp_pool_free, - NULL); + conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS, + sizeof(struct multipath_bh)); if (conf->pool == NULL) { printk(KERN_ERR "multipath: couldn't allocate memory for %s\n",