diff options
-rw-r--r-- | include/linux/cgroup.h | 7 | ||||
-rw-r--r-- | mm/memory-failure.c | 2 |
2 files changed, 3 insertions, 6 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 */ |
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 44c6bd201d3a..8639f6b28746 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -148,7 +148,7 @@ static int hwpoison_filter_task(struct page *p) | |||
148 | ino = cgroup_ino(css->cgroup); | 148 | ino = cgroup_ino(css->cgroup); |
149 | css_put(css); | 149 | css_put(css); |
150 | 150 | ||
151 | if (!ino || ino != hwpoison_filter_memcg) | 151 | if (ino != hwpoison_filter_memcg) |
152 | return -EINVAL; | 152 | return -EINVAL; |
153 | 153 | ||
154 | return 0; | 154 | return 0; |