Commit 7e00cca4 authored by Ed L. Cashin's avatar Ed L. Cashin Committed by Linus Torvalds

[PATCH] AOE: fix up the block device registration so that it actually works

Remove __exit from aoeblk_exit (to allow it to be called from __init code).

Remove register_blkdev into aoe_init (it's done in aoemain.c).
Signed-off-by: default avatarEd L. Cashin <ecashin@coraid.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent de2b5116
...@@ -245,7 +245,7 @@ aoeblk_gdalloc(void *vp) ...@@ -245,7 +245,7 @@ aoeblk_gdalloc(void *vp)
d->fw_ver, (long long)d->ssize); d->fw_ver, (long long)d->ssize);
} }
void __exit void
aoeblk_exit(void) aoeblk_exit(void)
{ {
kmem_cache_destroy(buf_pool_cache); kmem_cache_destroy(buf_pool_cache);
...@@ -254,19 +254,12 @@ aoeblk_exit(void) ...@@ -254,19 +254,12 @@ aoeblk_exit(void)
int __init int __init
aoeblk_init(void) aoeblk_init(void)
{ {
int n;
buf_pool_cache = kmem_cache_create("aoe_bufs", buf_pool_cache = kmem_cache_create("aoe_bufs",
sizeof(struct buf), sizeof(struct buf),
0, 0, NULL, NULL); 0, 0, NULL, NULL);
if (buf_pool_cache == NULL) if (buf_pool_cache == NULL)
return -ENOMEM; return -ENOMEM;
n = register_blkdev(AOE_MAJOR, DEVICE_NAME);
if (n < 0) {
printk(KERN_ERR "aoe: aoeblk_init: can't register major\n");
return n;
}
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment