zero i_uid/i_gid on inode allocation
... and don't bother in callers. Don't bother with zeroing i_blocks, while we are at it - it's already been zeroed. i_mode is not worth the effort; it has no common default value. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -131,6 +131,8 @@ struct inode *inode_init_always(struct super_block *sb, struct inode *inode)
|
||||
inode->i_op = &empty_iops;
|
||||
inode->i_fop = &empty_fops;
|
||||
inode->i_nlink = 1;
|
||||
inode->i_uid = 0;
|
||||
inode->i_gid = 0;
|
||||
atomic_set(&inode->i_writecount, 0);
|
||||
inode->i_size = 0;
|
||||
inode->i_blocks = 0;
|
||||
|
Reference in New Issue
Block a user