summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-12-09 09:34:39 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-01-05 11:54:28 -0500
commit56ff5efad96182f4d3cb3dc6b07396762c658f16 (patch)
treecb91f93aa2324573527165d56d230b606a3111ed /fs/proc
parentacfa4380efe77e290d3a96b11cd4c9f24f4fbb18 (diff)
downloadop-kernel-dev-56ff5efad96182f4d3cb3dc6b07396762c658f16.zip
op-kernel-dev-56ff5efad96182f4d3cb3dc6b07396762c658f16.tar.gz
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')
-rw-r--r--fs/proc/base.c4
-rw-r--r--fs/proc/proc_sysctl.c1
2 files changed, 0 insertions, 5 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index cad92c1..10fd522 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
if (!ei->pid)
goto out_unlock;
- inode->i_uid = 0;
- inode->i_gid = 0;
if (task_dumpable(task)) {
rcu_read_lock();
cred = __task_cred(task);
@@ -2349,8 +2347,6 @@ static struct dentry *proc_base_instantiate(struct inode *dir,
if (!ei->pid)
goto out_iput;
- inode->i_uid = 0;
- inode->i_gid = 0;
inode->i_mode = p->mode;
if (S_ISDIR(inode->i_mode))
inode->i_nlink = 2;
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 06ed10b..94fcfff 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -31,7 +31,6 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
inode->i_mode = table->mode;
- inode->i_uid = inode->i_gid = 0;
if (!table->child) {
inode->i_mode |= S_IFREG;
inode->i_op = &proc_sys_inode_operations;
OpenPOWER on IntegriCloud