[PATCH 6/8] fs/inode.c: call alloc_inode() in new_inode() directly

From: Yan Hong
Date: Thu Sep 27 2012 - 08:52:31 EST


This saves us a list head initialization.

Signed-off-by: Yan Hong <clouds.yan@xxxxxxxxx>
---
fs/inode.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/inode.c b/fs/inode.c
index ac8d904..3a2cd41 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -921,9 +921,11 @@ struct inode *new_inode(struct super_block *sb)

spin_lock_prefetch(&inode_sb_list_lock);

- inode = new_inode_pseudo(sb);
- if (inode)
+ inode = alloc_inode(sb);
+ if (inode) {
+ inode->i_state = 0;
inode_sb_list_add(inode);
+ }
return inode;
}
EXPORT_SYMBOL(new_inode);
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/