cgroup_subsys_state can never be NULL, so don't check for that in
hugetlb_cgroup_from_css. Also current task will always be part of some
cgroup. So hugetlb_cgrop_from_task cannot return NULL.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
static inline
struct hugetlb_cgroup *hugetlb_cgroup_from_css(struct cgroup_subsys_state *s)
{
- if (s)
- return container_of(s, struct hugetlb_cgroup, css);
- return NULL;
+ return container_of(s, struct hugetlb_cgroup, css);
}
static inline