diff options
| author | Jin Qian <jinqian@google.com> | 2017-02-16 18:07:05 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-23 13:00:17 +0200 |
| commit | a571c7301b1ea6433176320185b670e1b26034d9 (patch) | |
| tree | 8cdbfee4a18730d4f56c2ef2782f53fed074ca41 | |
| parent | a21417a8cab5a8acbb1e06834646ce31e3bfae8b (diff) | |
ANDROID: uid_sys_stats: remove unnecessary code in procstat switch
No need to aggregate the switched uid separately since
update_io_stats_locked covers all uids.
Bug: 34198239
Change-Id: Ifed347264b910de02e3f3c8dec95d1a2dbde58c0
Signed-off-by: Jin Qian <jinqian@google.com>
| -rw-r--r-- | drivers/misc/uid_sys_stats.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/misc/uid_sys_stats.c b/drivers/misc/uid_sys_stats.c index 836cf2e51..5d7d16dfd 100644 --- a/drivers/misc/uid_sys_stats.c +++ b/drivers/misc/uid_sys_stats.c @@ -346,9 +346,8 @@ static int uid_procstat_open(struct inode *inode, struct file *file) static ssize_t uid_procstat_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { - struct task_struct *task, *temp; struct uid_entry *uid_entry; - uid_t uid, task_uid; + uid_t uid; int argc, state; char input[128]; @@ -380,18 +379,6 @@ static ssize_t uid_procstat_write(struct file *file, return count; } - memset(&uid_entry->io[UID_STATE_TOTAL_CURR], 0, - sizeof(struct io_stats)); - - read_lock(&tasklist_lock); - do_each_thread(temp, task) { - task_uid = from_kuid_munged(current_user_ns(), task_uid(task)); - if (uid != task_uid) - continue; - add_uid_io_curr_stats(uid_entry, task); - } while_each_thread(temp, task); - read_unlock(&tasklist_lock); - update_io_stats_locked(); uid_entry->state = state; |
