diff options
author | Tom Zanussi <zanussi@us.ibm.com> | 2006-01-08 04:02:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:50 -0500 |
commit | aaea25d7a68a7f72e167dc1698b66a15edc71883 (patch) | |
tree | 2aef3767e751099aa05203fa5e255a639d430f94 /fs | |
parent | 51008f9f95a4c3158151a75f88fb03fb0f646aba (diff) |
[PATCH] relayfs: remove unused alloc/destroy_inode()
Since we're no longer using relayfs_inode_info, remove relayfs_alloc_inode()
and relayfs_destroy_inode() along with the relayfs inode cache.
Signed-off-by: Tom Zanussi <zanussi@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/relayfs/inode.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/fs/relayfs/inode.c b/fs/relayfs/inode.c index 7f6d2c8e91c2..b4c3e0466e98 100644 --- a/fs/relayfs/inode.c +++ b/fs/relayfs/inode.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | static struct vfsmount * relayfs_mount; | 27 | static struct vfsmount * relayfs_mount; |
28 | static int relayfs_mount_count; | 28 | static int relayfs_mount_count; |
29 | static kmem_cache_t * relayfs_inode_cachep; | ||
30 | 29 | ||
31 | static struct backing_dev_info relayfs_backing_dev_info = { | 30 | static struct backing_dev_info relayfs_backing_dev_info = { |
32 | .ra_pages = 0, /* No readahead */ | 31 | .ra_pages = 0, /* No readahead */ |
@@ -499,34 +498,6 @@ out: | |||
499 | return ret; | 498 | return ret; |
500 | } | 499 | } |
501 | 500 | ||
502 | /** | ||
503 | * relayfs alloc_inode() implementation | ||
504 | */ | ||
505 | static struct inode *relayfs_alloc_inode(struct super_block *sb) | ||
506 | { | ||
507 | struct relayfs_inode_info *p = kmem_cache_alloc(relayfs_inode_cachep, SLAB_KERNEL); | ||
508 | if (!p) | ||
509 | return NULL; | ||
510 | p->data = NULL; | ||
511 | |||
512 | return &p->vfs_inode; | ||
513 | } | ||
514 | |||
515 | /** | ||
516 | * relayfs destroy_inode() implementation | ||
517 | */ | ||
518 | static void relayfs_destroy_inode(struct inode *inode) | ||
519 | { | ||
520 | kmem_cache_free(relayfs_inode_cachep, RELAYFS_I(inode)); | ||
521 | } | ||
522 | |||
523 | static void init_once(void *p, kmem_cache_t *cachep, unsigned long flags) | ||
524 | { | ||
525 | struct relayfs_inode_info *i = p; | ||
526 | if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR) | ||
527 | inode_init_once(&i->vfs_inode); | ||
528 | } | ||
529 | |||
530 | struct file_operations relayfs_file_operations = { | 501 | struct file_operations relayfs_file_operations = { |
531 | .open = relayfs_open, | 502 | .open = relayfs_open, |
532 | .poll = relayfs_poll, | 503 | .poll = relayfs_poll, |
@@ -539,8 +510,6 @@ struct file_operations relayfs_file_operations = { | |||
539 | static struct super_operations relayfs_ops = { | 510 | static struct super_operations relayfs_ops = { |
540 | .statfs = simple_statfs, | 511 | .statfs = simple_statfs, |
541 | .drop_inode = generic_delete_inode, | 512 | .drop_inode = generic_delete_inode, |
542 | .alloc_inode = relayfs_alloc_inode, | ||
543 | .destroy_inode = relayfs_destroy_inode, | ||
544 | }; | 513 | }; |
545 | 514 | ||
546 | static int relayfs_fill_super(struct super_block * sb, void * data, int silent) | 515 | static int relayfs_fill_super(struct super_block * sb, void * data, int silent) |
@@ -584,25 +553,12 @@ static struct file_system_type relayfs_fs_type = { | |||
584 | 553 | ||
585 | static int __init init_relayfs_fs(void) | 554 | static int __init init_relayfs_fs(void) |
586 | { | 555 | { |
587 | int err; | 556 | return register_filesystem(&relayfs_fs_type); |
588 | |||
589 | relayfs_inode_cachep = kmem_cache_create("relayfs_inode_cache", | ||
590 | sizeof(struct relayfs_inode_info), 0, | ||
591 | 0, init_once, NULL); | ||
592 | if (!relayfs_inode_cachep) | ||
593 | return -ENOMEM; | ||
594 | |||
595 | err = register_filesystem(&relayfs_fs_type); | ||
596 | if (err) | ||
597 | kmem_cache_destroy(relayfs_inode_cachep); | ||
598 | |||
599 | return err; | ||
600 | } | 557 | } |
601 | 558 | ||
602 | static void __exit exit_relayfs_fs(void) | 559 | static void __exit exit_relayfs_fs(void) |
603 | { | 560 | { |
604 | unregister_filesystem(&relayfs_fs_type); | 561 | unregister_filesystem(&relayfs_fs_type); |
605 | kmem_cache_destroy(relayfs_inode_cachep); | ||
606 | } | 562 | } |
607 | 563 | ||
608 | module_init(init_relayfs_fs) | 564 | module_init(init_relayfs_fs) |