diff options
author | Zefan Li <lizefan@huawei.com> | 2014-09-19 04:29:31 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-09-19 09:16:23 -0400 |
commit | f29374b146dd02f5f99742aedaddd6ef3512fc9c (patch) | |
tree | 107e75d26d7a8a6a88747a9f5ef78e0a8405ff3d /include/linux/cgroup.h | |
parent | 52de4779f201758ddcf37360f09a16895756e708 (diff) |
cgroup: remove redundant check in cgroup_ino()
After we implemented default unified hierarchy, cgrp->kn can never
be NULL.
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 77a1d37b742b..818a81fe7ccc 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -532,13 +532,10 @@ static inline bool cgroup_has_tasks(struct cgroup *cgrp) | |||
532 | return !list_empty(&cgrp->cset_links); | 532 | return !list_empty(&cgrp->cset_links); |
533 | } | 533 | } |
534 | 534 | ||
535 | /* returns ino associated with a cgroup, 0 indicates unmounted root */ | 535 | /* returns ino associated with a cgroup */ |
536 | static inline ino_t cgroup_ino(struct cgroup *cgrp) | 536 | static inline ino_t cgroup_ino(struct cgroup *cgrp) |
537 | { | 537 | { |
538 | if (cgrp->kn) | 538 | return cgrp->kn->ino; |
539 | return cgrp->kn->ino; | ||
540 | else | ||
541 | return 0; | ||
542 | } | 539 | } |
543 | 540 | ||
544 | /* cft/css accessors for cftype->write() operation */ | 541 | /* cft/css accessors for cftype->write() operation */ |