Commit 7491f7e
committed
cgroup: Make cgroup_get_from_id() prettier
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2077665
commit 7e1eb54
Author: Tejun Heo <tj@kernel.org>
Date: Fri, 23 Sep 2022 07:23:06 -1000
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 <tj@kernel.org>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Waiman Long <longman@redhat.com>1 parent 43b08ea commit 7491f7e
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6026 | 6026 | | |
6027 | 6027 | | |
6028 | 6028 | | |
6029 | | - | |
| 6029 | + | |
6030 | 6030 | | |
6031 | 6031 | | |
6032 | 6032 | | |
6033 | | - | |
| 6033 | + | |
6034 | 6034 | | |
6035 | | - | |
6036 | | - | |
| 6035 | + | |
| 6036 | + | |
| 6037 | + | |
| 6038 | + | |
6037 | 6039 | | |
6038 | 6040 | | |
6039 | 6041 | | |
| |||
6042 | 6044 | | |
6043 | 6045 | | |
6044 | 6046 | | |
6045 | | - | |
6046 | 6047 | | |
6047 | 6048 | | |
6048 | 6049 | | |
6049 | | - | |
| 6050 | + | |
6050 | 6051 | | |
6051 | 6052 | | |
6052 | 6053 | | |
6053 | 6054 | | |
6054 | 6055 | | |
6055 | 6056 | | |
6056 | | - | |
| 6057 | + | |
6057 | 6058 | | |
6058 | | - | |
6059 | | - | |
| 6059 | + | |
| 6060 | + | |
6060 | 6061 | | |
6061 | 6062 | | |
6062 | 6063 | | |
| |||
0 commit comments