• Michal Koutný's avatar
    cgroup: Homogenize cgroup_get_from_id() return value · fa7e439c
    Michal Koutný authored
    Cgroup id is user provided datum hence extend its return domain to
    include possible error reason (similar to cgroup_get_from_fd()).
    
    This change also fixes commit d4ccaf58 ("bpf: Introduce cgroup
    iter") that would use NULL instead of proper error handling in
    d4ccaf58 ("bpf: Introduce cgroup iter").
    
    Additionally, neither of: fc_appid_store, bpf_iter_attach_cgroup,
    mem_cgroup_get_from_ino (callers of cgroup_get_from_fd) is built without
    CONFIG_CGROUPS (depends via CONFIG_BLK_CGROUP, direct, transitive
    CONFIG_MEMCG respectively) transitive, so drop the singular definition
    not needed with !CONFIG_CGROUPS.
    
    Fixes: d4ccaf58 ("bpf: Introduce cgroup iter")
    Signed-off-by: default avatarMichal Koutný <mkoutny@suse.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    fa7e439c
blk-cgroup-fc-appid.c 1.42 KB