The patch titled Subject: memcg: fix error code in hugetlb_force_memcg_empty() has been added to the -mm tree. Its filename is memcg-fix-error-code-in-hugetlb_force_memcg_empty.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Subject: memcg: fix error code in hugetlb_force_memcg_empty() hugetlb_force_memcg_empty() incorrectly returns 0 (success) when the cgroup is found to be busy. Return -EBUSY instead. Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx> Cc: Ying Han <yinghan@xxxxxxxxxx> Cc: Glauber Costa <glommer@xxxxxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff -puN mm/hugetlb.c~memcg-fix-error-code-in-hugetlb_force_memcg_empty mm/hugetlb.c --- a/mm/hugetlb.c~memcg-fix-error-code-in-hugetlb_force_memcg_empty +++ a/mm/hugetlb.c @@ -1922,8 +1922,11 @@ int hugetlb_force_memcg_empty(struct cgr int ret = 0, idx = 0; do { - if (cgroup_task_count(cgroup) || !list_empty(&cgroup->children)) + if (cgroup_task_count(cgroup) + || !list_empty(&cgroup->children)) { + ret = -EBUSY; goto out; + } /* * If the task doing the cgroup_rmdir got a signal * we don't really need to loop till the hugetlb resource _ Subject: Subject: memcg: fix error code in hugetlb_force_memcg_empty() Patches currently in -mm which might be from kamezawa.hiroyu@xxxxxxxxxxxxxx are origin.patch linux-next.patch hugetlb-rename-max_hstate-to-hugetlb_max_hstate.patch hugetlbfs-dont-use-err_ptr-with-vm_fault-values.patch hugetlbfs-add-an-inline-helper-for-finding-hstate-index.patch hugetlb-use-mmu_gather-instead-of-a-temporary-linked-list-for-accumulating-pages.patch hugetlb-use-mmu_gather-instead-of-a-temporary-linked-list-for-accumulating-pages-fix.patch hugetlb-use-mmu_gather-instead-of-a-temporary-linked-list-for-accumulating-pages-fix-fix.patch hugetlb-avoid-taking-i_mmap_mutex-in-unmap_single_vma-for-hugetlb.patch hugetlb-simplify-migrate_huge_page.patch memcg-add-hugetlb-extension.patch memcg-add-hugetlb-extension-fix.patch memcg-add-hugetlb-extension-fix-fix.patch hugetlb-add-charge-uncharge-calls-for-hugetlb-alloc-free.patch memcg-track-resource-index-in-cftype-private.patch hugetlbfs-add-memcg-control-files-for-hugetlbfs.patch hugetlbfs-add-memcg-control-files-for-hugetlbfs-use-scnprintf-instead-of-sprintf.patch hugetlbfs-add-memcg-control-files-for-hugetlbfs-use-scnprintf-instead-of-sprintf-fix.patch hugetlbfs-add-a-list-for-tracking-in-use-hugetlb-pages.patch memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal.patch memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal-fix.patch memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal-fix-fix.patch hugetlb-migrate-memcg-info-from-oldpage-to-new-page-during-migration.patch memcg-add-memory-controller-documentation-for-hugetlb-management.patch mm-mmapc-find_vma-remove-unnecessary-ifmm-check.patch mm-mmapc-find_vma-remove-unnecessary-ifmm-check-fix.patch mm-correctly-synchronize-rss-counters-at-exit-exec.patch thp-memcg-split-hugepage-for-memcg-oom-on-cow.patch mm-do_migrate_pages-calls-migrate_to_node-even-if-task-is-already-on-a-correct-node.patch mm-do_migrate_pages-calls-migrate_to_node-even-if-task-is-already-on-a-correct-node-fix.patch mm-do_migrate_pages-rename-arguments.patch kernel-cgroup-push-rcu-read-locking-from-css_is_ancestor-to-callsite.patch mm-memcg-count-pte-references-from-every-member-of-the-reclaimed-hierarchy.patch mm-thp-drop-page_table_lock-to-uncharge-memcg-pages.patch documentation-memcg-future-proof-hierarchical-statistics-documentation.patch mm-page_allocc-remove-pageblock_default_order.patch memcg-fix-change-behavior-of-shared-anon-at-moving-task.patch memcg-swap-mem_cgroup_move_swap_account-never-needs-fixup.patch memcg-swap-use-mem_cgroup_uncharge_swap.patch mm-memcg-scanning_global_lru-means-mem_cgroup_disabled.patch mm-memcg-move-reclaim_stat-into-lruvec.patch mm-push-lru-index-into-shrink_active_list.patch mm-push-lru-index-into-shrink_active_list-fix.patch mm-mark-mm-inline-functions-as-__always_inline.patch mm-remove-lru-type-checks-from-__isolate_lru_page.patch mm-memcg-kill-mem_cgroup_lru_del.patch memcg-mark-more-functions-variables-as-static.patch memcg-remove-unused-variable.patch memcg-mark-stat-field-of-mem_cgroup-struct-as-__percpu.patch memcg-remove-redundant-parentheses.patch memcg-make-threshold-index-in-the-right-position.patch memcg-revise-the-position-of-threshold-index-while-unregistering-event.patch memcg-add-mlock-statistic-in-memorystat.patch memcg-add-mlock-statistic-in-memorystat-fix.patch mm-vmscan-store-priority-in-struct-scan_control.patch mm-add-link-from-struct-lruvec-to-struct-zone.patch mm-vmscan-push-lruvec-pointer-into-isolate_lru_pages.patch mm-vmscan-push-zone-pointer-into-shrink_page_list.patch mm-vmscan-remove-update_isolated_counts.patch mm-vmscan-push-lruvec-pointer-into-putback_inactive_pages.patch mm-vmscan-replace-zone_nr_lru_pages-with-get_lruvec_size.patch mm-vmscan-push-lruvec-pointer-into-inactive_list_is_low.patch mm-vmscan-push-lruvec-pointer-into-shrink_list.patch mm-vmscan-push-lruvec-pointer-into-get_scan_count.patch mm-vmscan-push-lruvec-pointer-into-should_continue_reclaim.patch mm-vmscan-kill-struct-mem_cgroup_zone.patch memcg-fix-error-code-in-hugetlb_force_memcg_empty.patch rescounters-add-res_counter_uncharge_until.patch memcg-use-res_counter_uncharge_until-in-move_parent.patch memcg-move-charges-to-root-cgroup-if-use_hierarchy=0.patch memcg-dont-uncharge-in-mem_cgroup_move_account.patch remove-__must_check-for-res_counter_charge_nofail.patch fork-call-complete_vfork_done-after-clearing-child_tid-and-flushing-rss-counters.patch fs-proc-introduce-proc-pid-task-tid-children-entry-v9.patch fs-proc-introduce-proc-pid-task-tid-children-entry-v9-fix.patch c-r-procfs-add-arg_start-end-env_start-end-and-exit_code-members-to-proc-pid-stat.patch c-r-prctl-extend-pr_set_mm-to-set-up-more-mm_struct-entries-v2.patch c-r-prctl-simplify-pr_set_mm-on-mm-code-data-assignment.patch c-r-prctl-simplify-pr_set_mm-on-mm-code-data-assignment-fix.patch c-r-prctl-return-efault-instead-of-einval-in-case-if-underlied-vma-is-not-found.patch c-r-prctl-drop-vma-flags-test-on-pr_set_mm_-stack-data-assignment.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html