Commit f29374b146dd02f5f99742aedaddd6ef3512fc9c
Committed by
Tejun Heo
1 parent
52de4779f2
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 2 changed files with 3 additions and 6 deletions Side-by-side Diff
include/linux/cgroup.h
... | ... | @@ -532,13 +532,10 @@ |
532 | 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 | 536 | static inline ino_t cgroup_ino(struct cgroup *cgrp) |
537 | 537 | { |
538 | - if (cgrp->kn) | |
539 | - return cgrp->kn->ino; | |
540 | - else | |
541 | - return 0; | |
538 | + return cgrp->kn->ino; | |
542 | 539 | } |
543 | 540 | |
544 | 541 | /* cft/css accessors for cftype->write() operation */ |