cgroup: mark cgroup_get() with __maybe_unused

a590b90d47 ("cgroup: fix spurious warnings on cgroup_is_dead() from
cgroup_sk_alloc()") converted most cgroup_get() usages to
cgroup_get_live() leaving cgroup_sk_alloc() the sole user of
cgroup_get().  When !CONFIG_SOCK_CGROUP_DATA, this ends up triggering
unused warning for cgroup_get().

Silence the warning by adding __maybe_unused to cgroup_get().

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: http://lkml.kernel.org/r/20170501145340.17e8ef86@canb.auug.org.au
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Tejun Heo 2017-05-01 15:24:14 -04:00
parent 9732adc5d6
commit 310b4816a5
1 changed files with 1 additions and 1 deletions

View File

@ -436,7 +436,7 @@ out_unlock:
return css; return css;
} }
static void cgroup_get(struct cgroup *cgrp) static void __maybe_unused cgroup_get(struct cgroup *cgrp)
{ {
css_get(&cgrp->self); css_get(&cgrp->self);
} }