[JFFS2] Clean up jffs2_alloc_inode() and jffs2_i_init_once()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu May 1 07:59:01 EDT 2008
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4e571aba7bb25a3a069a7b88c0f63fe5a14c05c6
Commit: 4e571aba7bb25a3a069a7b88c0f63fe5a14c05c6
Parent: fb96c00819c28860fd10137f1c63f7c48dec252b
Author: David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Thu May 1 12:28:04 2008 +0100
Committer: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Thu May 1 12:29:37 2008 +0100
[JFFS2] Clean up jffs2_alloc_inode() and jffs2_i_init_once()
Ditch a couple of pointless casts from void *, and use the normal
variable name 'f' for jffs2_inode_info pointers -- especially since
it actually shows up in lockdep reports.
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
fs/jffs2/super.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index f3353df..7da69ea 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -31,11 +31,12 @@ static struct kmem_cache *jffs2_inode_cachep;
static struct inode *jffs2_alloc_inode(struct super_block *sb)
{
- struct jffs2_inode_info *ei;
- ei = (struct jffs2_inode_info *)kmem_cache_alloc(jffs2_inode_cachep, GFP_KERNEL);
- if (!ei)
+ struct jffs2_inode_info *f;
+
+ f = kmem_cache_alloc(jffs2_inode_cachep, GFP_KERNEL);
+ if (!f)
return NULL;
- return &ei->vfs_inode;
+ return &f->vfs_inode;
}
static void jffs2_destroy_inode(struct inode *inode)
@@ -45,10 +46,10 @@ static void jffs2_destroy_inode(struct inode *inode)
static void jffs2_i_init_once(struct kmem_cache *cachep, void *foo)
{
- struct jffs2_inode_info *ei = (struct jffs2_inode_info *) foo;
+ struct jffs2_inode_info *f = foo;
- mutex_init(&ei->sem);
- inode_init_once(&ei->vfs_inode);
+ mutex_init(&f->sem);
+ inode_init_once(&f->vfs_inode);
}
static int jffs2_sync_fs(struct super_block *sb, int wait)
More information about the linux-mtd-cvs
mailing list