diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-09 09:34:39 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-01-05 11:54:28 -0500 |
commit | 56ff5efad96182f4d3cb3dc6b07396762c658f16 (patch) | |
tree | cb91f93aa2324573527165d56d230b606a3111ed /fs/libfs.c | |
parent | acfa4380efe77e290d3a96b11cd4c9f24f4fbb18 (diff) |
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>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index e960a8321902..7de05f7ce746 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -231,7 +231,6 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name, | |||
231 | */ | 231 | */ |
232 | root->i_ino = 1; | 232 | root->i_ino = 1; |
233 | root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR; | 233 | root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR; |
234 | root->i_uid = root->i_gid = 0; | ||
235 | root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME; | 234 | root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME; |
236 | dentry = d_alloc(NULL, &d_name); | 235 | dentry = d_alloc(NULL, &d_name); |
237 | if (!dentry) { | 236 | if (!dentry) { |
@@ -436,8 +435,6 @@ int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files | |||
436 | */ | 435 | */ |
437 | inode->i_ino = 1; | 436 | inode->i_ino = 1; |
438 | inode->i_mode = S_IFDIR | 0755; | 437 | inode->i_mode = S_IFDIR | 0755; |
439 | inode->i_uid = inode->i_gid = 0; | ||
440 | inode->i_blocks = 0; | ||
441 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 438 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
442 | inode->i_op = &simple_dir_inode_operations; | 439 | inode->i_op = &simple_dir_inode_operations; |
443 | inode->i_fop = &simple_dir_operations; | 440 | inode->i_fop = &simple_dir_operations; |
@@ -464,8 +461,6 @@ int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files | |||
464 | if (!inode) | 461 | if (!inode) |
465 | goto out; | 462 | goto out; |
466 | inode->i_mode = S_IFREG | files->mode; | 463 | inode->i_mode = S_IFREG | files->mode; |
467 | inode->i_uid = inode->i_gid = 0; | ||
468 | inode->i_blocks = 0; | ||
469 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 464 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
470 | inode->i_fop = files->ops; | 465 | inode->i_fop = files->ops; |
471 | inode->i_ino = i; | 466 | inode->i_ino = i; |