mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@us.ibm.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, karim@opersys.com
Subject: [PATCH 5/12] relayfs: remove unused alloc/destroy_inode()
Date: Fri, 11 Nov 2005 10:49:29 -0600	[thread overview]
Message-ID: <17268.52121.810790.84372@tut.ibm.com> (raw)
In-Reply-To: <17268.51814.215178.281986@tut.ibm.com>

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>

---

 fs/relayfs/inode.c         |   46 ---------------------------------------------
 include/linux/relayfs_fs.h |   14 -------------
 2 files changed, 1 insertion(+), 59 deletions(-)

diff --git a/fs/relayfs/inode.c b/fs/relayfs/inode.c
--- a/fs/relayfs/inode.c
+++ b/fs/relayfs/inode.c
@@ -26,7 +26,6 @@
 
 static struct vfsmount *		relayfs_mount;
 static int				relayfs_mount_count;
-static kmem_cache_t *			relayfs_inode_cachep;
 
 static struct backing_dev_info		relayfs_backing_dev_info = {
 	.ra_pages	= 0,	/* No readahead */
@@ -499,34 +498,6 @@ out:
 	return ret;
 }
 
-/**
- *	relayfs alloc_inode() implementation
- */
-static struct inode *relayfs_alloc_inode(struct super_block *sb)
-{
-	struct relayfs_inode_info *p = kmem_cache_alloc(relayfs_inode_cachep, SLAB_KERNEL);
-	if (!p)
-		return NULL;
-	p->data = NULL;
-
-	return &p->vfs_inode;
-}
-
-/**
- *	relayfs destroy_inode() implementation
- */
-static void relayfs_destroy_inode(struct inode *inode)
-{
-	kmem_cache_free(relayfs_inode_cachep, RELAYFS_I(inode));
-}
-
-static void init_once(void *p, kmem_cache_t *cachep, unsigned long flags)
-{
-	struct relayfs_inode_info *i = p;
-	if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR)
-		inode_init_once(&i->vfs_inode);
-}
-
 struct file_operations relayfs_file_operations = {
 	.open		= relayfs_open,
 	.poll		= relayfs_poll,
@@ -539,8 +510,6 @@ struct file_operations relayfs_file_oper
 static struct super_operations relayfs_ops = {
 	.statfs		= simple_statfs,
 	.drop_inode	= generic_delete_inode,
-	.alloc_inode	= relayfs_alloc_inode,
-	.destroy_inode	= relayfs_destroy_inode,
 };
 
 static int relayfs_fill_super(struct super_block * sb, void * data, int silent)
@@ -584,25 +553,12 @@ static struct file_system_type relayfs_f
 
 static int __init init_relayfs_fs(void)
 {
-	int err;
-
-	relayfs_inode_cachep = kmem_cache_create("relayfs_inode_cache",
-				sizeof(struct relayfs_inode_info), 0,
-				0, init_once, NULL);
-	if (!relayfs_inode_cachep)
-		return -ENOMEM;
-
-	err = register_filesystem(&relayfs_fs_type);
-	if (err)
-		kmem_cache_destroy(relayfs_inode_cachep);
-
-	return err;
+	return register_filesystem(&relayfs_fs_type);
 }
 
 static void __exit exit_relayfs_fs(void)
 {
 	unregister_filesystem(&relayfs_fs_type);
-	kmem_cache_destroy(relayfs_inode_cachep);
 }
 
 module_init(init_relayfs_fs)
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h
--- a/include/linux/relayfs_fs.h
+++ b/include/linux/relayfs_fs.h
@@ -64,20 +64,6 @@ struct rchan
 };
 
 /*
- * Relayfs inode
- */
-struct relayfs_inode_info
-{
-	struct inode vfs_inode;
-	void *data;
-};
-
-static inline struct relayfs_inode_info *RELAYFS_I(struct inode *inode)
-{
-	return container_of(inode, struct relayfs_inode_info, vfs_inode);
-}
-
-/*
  * Relay channel client callbacks
  */
 struct rchan_callbacks



  parent reply	other threads:[~2005-11-11 16:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11 16:44 [PATCH 0/12] relayfs: API additions and fixes Tom Zanussi
2005-11-11 16:46 ` [PATCH 1/12] relayfs: decouple buffer creation from inode creation Tom Zanussi
2005-11-11 16:47 ` [PATCH 2/12] relayfs: export relayfs_create_file() with fileops param Tom Zanussi
2005-11-11 19:37   ` Christoph Hellwig
2005-11-11 19:49     ` Tom Zanussi
2005-12-06 17:29       ` Christoph Hellwig
2005-12-06 19:51         ` Tom Zanussi
2005-11-12  2:10     ` Baruch Even
2005-11-11 16:47 ` [PATCH 3/12] relayfs: add relayfs_remove_file() Tom Zanussi
2005-11-11 16:48 ` [PATCH 4/12] relayfs: use generic_ip for private data Tom Zanussi
2005-11-11 16:49 ` Tom Zanussi [this message]
2005-11-11 16:50 ` [PATCH 6/12] relayfs: add Documention for non-relay files Tom Zanussi
2005-11-11 16:51 ` [PATCH 7/12] relayfs: add support for relay files in other filesystems Tom Zanussi
2005-11-11 16:51 ` [PATCH 8/12] relayfs: add Documentation on " Tom Zanussi
2005-11-11 16:52 ` [PATCH 9/12] relayfs: add support for global relay buffers Tom Zanussi
2005-11-11 16:52 ` [PATCH 10/12] relayfs: add Documentation on " Tom Zanussi
2005-11-11 16:53 ` [PATCH 11/12] relayfs: cleanup, change relayfs_file_* to relay_file_* Tom Zanussi
2005-11-11 16:54 ` [PATCH 12/12] relayfs: Documentation cleanup, remove obsolete info Tom Zanussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17268.52121.810790.84372@tut.ibm.com \
    --to=zanussi@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=karim@opersys.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®