This saves us a list head initialization.

Signed-off-by: Yan Hong <clouds....@gmail.com>
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to