Commit 7e1eb54
committed
cgroup: Make cgroup_get_from_id() prettier
After merging 836ac87d ("cgroup: fix cgroup_get_from_id") into for-6.1, its
combination with two commits in for-6.1 - 4534dee ("cgroup: cgroup: Honor
caller's cgroup NS when resolving cgroup id") and fa7e439 ("cgroup:
Homogenize cgroup_get_from_id() return value") - makes the gotos in the
error handling path too ugly while not adding anything of value.
All that the gotos are saving is one extra kernfs_put() call. Let's remove
the gotos and perform error returns directly.
Signed-off-by: Tejun Heo <[email protected]>
Cc: Ming Lei <[email protected]>
Cc: Michal Koutný <[email protected]>1 parent 026e14a commit 7e1eb54
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6066 | 6066 | | |
6067 | 6067 | | |
6068 | 6068 | | |
6069 | | - | |
| 6069 | + | |
6070 | 6070 | | |
6071 | 6071 | | |
6072 | 6072 | | |
6073 | | - | |
| 6073 | + | |
6074 | 6074 | | |
6075 | | - | |
6076 | | - | |
| 6075 | + | |
| 6076 | + | |
| 6077 | + | |
| 6078 | + | |
6077 | 6079 | | |
6078 | 6080 | | |
6079 | 6081 | | |
| |||
6082 | 6084 | | |
6083 | 6085 | | |
6084 | 6086 | | |
6085 | | - | |
6086 | 6087 | | |
6087 | 6088 | | |
6088 | 6089 | | |
6089 | | - | |
| 6090 | + | |
6090 | 6091 | | |
6091 | 6092 | | |
6092 | 6093 | | |
6093 | 6094 | | |
6094 | 6095 | | |
6095 | 6096 | | |
6096 | | - | |
| 6097 | + | |
6097 | 6098 | | |
6098 | | - | |
6099 | | - | |
| 6099 | + | |
| 6100 | + | |
6100 | 6101 | | |
6101 | 6102 | | |
6102 | 6103 | | |
| |||
0 commit comments