vfs: Allocate anon_inode_inode in anon_inode_init()
authorJan Kara <jack@suse.cz>
Wed, 26 Mar 2014 05:20:14 +0000 (06:20 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 Mar 2014 16:52:54 +0000 (09:52 -0700)
commit75c5a52da3fc2a06abb6c6192bdf5d680e56d37d
treead31cd7d9c1d5893d6b2ce392b170c068b625688
parentf217c44ebd41ce7369d2df07622b2839479183b0
vfs: Allocate anon_inode_inode in anon_inode_init()

Currently we allocated anon_inode_inode in anon_inodefs_mount. This is
somewhat fragile as if that function ever gets called again, it will
overwrite anon_inode_inode pointer. So move the initialization of
anon_inode_inode to anon_inode_init().

Signed-off-by: Jan Kara <jack@suse.cz>
[ Further simplified on suggestion from Dave Jones ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/anon_inodes.c