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/proc/base.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/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index cad92c1ac2b3..10fd5223d600 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1426,8 +1426,6 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st | |||
1426 | if (!ei->pid) | 1426 | if (!ei->pid) |
1427 | goto out_unlock; | 1427 | goto out_unlock; |
1428 | 1428 | ||
1429 | inode->i_uid = 0; | ||
1430 | inode->i_gid = 0; | ||
1431 | if (task_dumpable(task)) { | 1429 | if (task_dumpable(task)) { |
1432 | rcu_read_lock(); | 1430 | rcu_read_lock(); |
1433 | cred = __task_cred(task); | 1431 | cred = __task_cred(task); |
@@ -2349,8 +2347,6 @@ static struct dentry *proc_base_instantiate(struct inode *dir, | |||
2349 | if (!ei->pid) | 2347 | if (!ei->pid) |
2350 | goto out_iput; | 2348 | goto out_iput; |
2351 | 2349 | ||
2352 | inode->i_uid = 0; | ||
2353 | inode->i_gid = 0; | ||
2354 | inode->i_mode = p->mode; | 2350 | inode->i_mode = p->mode; |
2355 | if (S_ISDIR(inode->i_mode)) | 2351 | if (S_ISDIR(inode->i_mode)) |
2356 | inode->i_nlink = 2; | 2352 | inode->i_nlink = 2; |