[PATCH 0/4] taskstats: four more tidy-ups in the genl path
From: Bradley Morgan
Date: Sat Oct 31 2026 - 20:56:38 EST
Four small cleanups from reading kernel/taskstats.c again. No functional
change in any of them.
Patch 1 uses nla_put_u32() in mk_reply() instead of open coding the u32
attribute with nla_put() and a sizeof/& pair.
Patch 2 grabs the inode once with file_inode() in exe_add_tsk(), which
walks exe_file->f_inode twice today, once for the device and once for the
number.
Patch 3 reads the cgroupstats fd out of na, which the function already
fetched, instead of indexing info->attrs[] again for the same attribute.
Patch 4 converts the elapsed time with div_u64() in
tgid_stats_add_task(), like the utime and stime lines four below it do,
instead of do_div().
Balbir Singh has moved to balbirs@xxxxxxxxxx, MAINTAINERS still lists the
old gmail address.
Bradley Morgan (4):
taskstats: use nla_put_u32() in mk_reply()
taskstats: take the inode once in exe_add_tsk()
taskstats: reuse na in cgroupstats_user_cmd()
taskstats: use div_u64() for the elapsed time in tgid_stats_add_task()
kernel/taskstats.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--
2.53.0