diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-17 15:56:03 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 20:26:03 +0300 |
commit | 1fc2e3e59d78999fc4be7349af769cf6621b9e61 (patch) | |
tree | 98f923f53587d71bbc35cbbb21e4c21e7db4cadd /drivers/mtd/ubi/scan.c | |
parent | 0bae2887a725767bf00434fae18387818f8cc931 (diff) |
UBI: rename ubi_scan_leb_slab
The old name is not logical anymore - rename it to 'aeb_slab_cache'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index daa53a8fca8..06a2d706213 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c @@ -125,7 +125,7 @@ static int add_to_list(struct ubi_attach_info *ai, int pnum, int ec, } else BUG(); - aeb = kmem_cache_alloc(ai->scan_leb_slab, GFP_KERNEL); + aeb = kmem_cache_alloc(ai->aeb_slab_cache, GFP_KERNEL); if (!aeb) return -ENOMEM; @@ -154,7 +154,7 @@ static int add_corrupted(struct ubi_attach_info *ai, int pnum, int ec) dbg_bld("add to corrupted: PEB %d, EC %d", pnum, ec); - aeb = kmem_cache_alloc(ai->scan_leb_slab, GFP_KERNEL); + aeb = kmem_cache_alloc(ai->aeb_slab_cache, GFP_KERNEL); if (!aeb) return -ENOMEM; @@ -562,7 +562,7 @@ int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum, if (err) return err; - aeb = kmem_cache_alloc(ai->scan_leb_slab, GFP_KERNEL); + aeb = kmem_cache_alloc(ai->aeb_slab_cache, GFP_KERNEL); if (!aeb) return -ENOMEM; @@ -1133,10 +1133,10 @@ struct ubi_attach_info *ubi_scan(struct ubi_device *ubi) ai->volumes = RB_ROOT; err = -ENOMEM; - ai->scan_leb_slab = kmem_cache_create("ubi_scan_leb_slab", - sizeof(struct ubi_ainf_peb), - 0, 0, NULL); - if (!ai->scan_leb_slab) + ai->aeb_slab_cache = kmem_cache_create("ubi_aeb_slab_cache", + sizeof(struct ubi_ainf_peb), + 0, 0, NULL); + if (!ai->aeb_slab_cache) goto out_ai; ech = kzalloc(ubi->ec_hdr_alsize, GFP_KERNEL); @@ -1235,7 +1235,7 @@ static void destroy_av(struct ubi_attach_info *ai, struct ubi_ainf_volume *av) this->rb_right = NULL; } - kmem_cache_free(ai->scan_leb_slab, aeb); + kmem_cache_free(ai->aeb_slab_cache, aeb); } } kfree(av); @@ -1253,19 +1253,19 @@ void ubi_destroy_ai(struct ubi_attach_info *ai) list_for_each_entry_safe(aeb, aeb_tmp, &ai->alien, u.list) { list_del(&aeb->u.list); - kmem_cache_free(ai->scan_leb_slab, aeb); + kmem_cache_free(ai->aeb_slab_cache, aeb); } list_for_each_entry_safe(aeb, aeb_tmp, &ai->erase, u.list) { list_del(&aeb->u.list); - kmem_cache_free(ai->scan_leb_slab, aeb); + kmem_cache_free(ai->aeb_slab_cache, aeb); } list_for_each_entry_safe(aeb, aeb_tmp, &ai->corr, u.list) { list_del(&aeb->u.list); - kmem_cache_free(ai->scan_leb_slab, aeb); + kmem_cache_free(ai->aeb_slab_cache, aeb); } list_for_each_entry_safe(aeb, aeb_tmp, &ai->free, u.list) { list_del(&aeb->u.list); - kmem_cache_free(ai->scan_leb_slab, aeb); + kmem_cache_free(ai->aeb_slab_cache, aeb); } /* Destroy the volume RB-tree */ @@ -1290,8 +1290,8 @@ void ubi_destroy_ai(struct ubi_attach_info *ai) } } - if (ai->scan_leb_slab) - kmem_cache_destroy(ai->scan_leb_slab); + if (ai->aeb_slab_cache) + kmem_cache_destroy(ai->aeb_slab_cache); kfree(ai); } |