diff options
| author | Pavel Emelyanov <[email protected]> | 2008-06-05 22:46:26 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-06-06 11:29:11 -0700 |
| commit | cc9cb219aac24ffc711566c8f372c2b3a3bf840f (patch) | |
| tree | efa678227596922a00b2a7744c33707041c78316 /include/linux | |
| parent | b66862f7663332aa1ecb3ebda4086360ddb8befc (diff) | |
devscgroup: relax task to dev_cgroup conversion
Two functions, that need to get a device_cgroup from a task (they are
devcgroup_inode_permission and devcgroup_inode_mknod) make it in a strange
way:
They get a css_set from task, then a subsys_state from css_set, then a
cgroup from the state and then a subsys_state again from the cgroup.
Besides, the devices_subsys_id is read from memory, whilst there's a
enum-ed constant for it.
Optimize this part a bit:
1. Get the subsys_stats form the task and be done - no 2 extra
dereferences,
2. Use the device_subsys_id constant, not the value from memory
(i.e. one less dereference).
Found while preparing 2.6.26 OpenVZ port.
Signed-off-by: Pavel Emelyanov <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Acked-by: Paul Menage <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: James Morris <[email protected]>
Cc: Chris Wright <[email protected]>
Cc: Stephen Smalley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions