[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348750316-4138-6-git-send-email-clouds.yan@gmail.com>
Date: Thu, 27 Sep 2012 20:51:54 +0800
From: Yan Hong <clouds.yan@...il.com>
To: viro@...iv.linux.org.uk
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 6/8] fs/inode.c: call alloc_inode() in new_inode() directly
This saves us a list head initialization.
Signed-off-by: Yan Hong <clouds.yan@...il.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists