summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorRui Xiang <rui.xiang@huawei.com>2014-01-10 12:42:03 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2014-01-10 12:42:03 +1100
commit153eb13308c1bcbff2a35c155af66dfcb5f75c61 (patch)
tree585ede5fa80e5e607945898c5074e7a7f7b65410 /fs
parent4dee25d3e84f97f0d6c9fb48a21fdb94ba833dad (diff)
proc: set attributes of pde using accessor functions
Use existing accessors proc_set_user() and proc_set_size() to set attributes. Just a cleanup. Signed-off-by: Rui Xiang <rui.xiang@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/generic.c3
-rw-r--r--fs/proc/proc_devtree.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index cca93b6fb9a9..b7f268eb5f45 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -49,8 +49,7 @@ static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
setattr_copy(inode, iattr);
mark_inode_dirty(inode);
- de->uid = inode->i_uid;
- de->gid = inode->i_gid;
+ proc_set_user(de, inode->i_uid, inode->i_gid);
de->mode = inode->i_mode;
return 0;
}
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 70779b2fc209..c824187251f6 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -74,9 +74,9 @@ __proc_device_tree_add_prop(struct proc_dir_entry *de, struct property *pp,
return NULL;
if (!strncmp(name, "security-", 9))
- ent->size = 0; /* don't leak number of password chars */
+ proc_set_size(ent, 0); /* don't leak number of password chars */
else
- ent->size = pp->length;
+ proc_set_size(ent, pp->length);
return ent;
}