Commit 4e571aba authored by David Woodhouse's avatar David Woodhouse

[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: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent fb96c008
...@@ -31,11 +31,12 @@ static struct kmem_cache *jffs2_inode_cachep; ...@@ -31,11 +31,12 @@ static struct kmem_cache *jffs2_inode_cachep;
static struct inode *jffs2_alloc_inode(struct super_block *sb) static struct inode *jffs2_alloc_inode(struct super_block *sb)
{ {
struct jffs2_inode_info *ei; struct jffs2_inode_info *f;
ei = (struct jffs2_inode_info *)kmem_cache_alloc(jffs2_inode_cachep, GFP_KERNEL);
if (!ei) f = kmem_cache_alloc(jffs2_inode_cachep, GFP_KERNEL);
if (!f)
return NULL; return NULL;
return &ei->vfs_inode; return &f->vfs_inode;
} }
static void jffs2_destroy_inode(struct inode *inode) static void jffs2_destroy_inode(struct inode *inode)
...@@ -45,10 +46,10 @@ 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) 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); mutex_init(&f->sem);
inode_init_once(&ei->vfs_inode); inode_init_once(&f->vfs_inode);
} }
static int jffs2_sync_fs(struct super_block *sb, int wait) static int jffs2_sync_fs(struct super_block *sb, int wait)
......
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