The patch titled Subject: memcg: do not check for do_swap_account in mem_cgroup_{read,write,reset} has been added to the -mm tree. Its filename is memcg-do-not-check-for-do_swap_account-in-mem_cgroup_readwritereset.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: Michal Hocko <mhocko@xxxxxxx> Subject: memcg: do not check for do_swap_account in mem_cgroup_{read,write,reset} Since 2d11085e ("memcg: do not create memsw files if swap accounting is disabled") memsw files are created only if memcg swap accounting is enabled so it doesn't make any sense to check for it explicitly in mem_cgroup_read(), mem_cgroup_write() and mem_cgroup_reset(). Signed-off-by: Michal Hocko <mhocko@xxxxxxx> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 9 --------- 1 file changed, 9 deletions(-) diff -puN mm/memcontrol.c~memcg-do-not-check-for-do_swap_account-in-mem_cgroup_readwritereset mm/memcontrol.c --- a/mm/memcontrol.c~memcg-do-not-check-for-do_swap_account-in-mem_cgroup_readwritereset +++ a/mm/memcontrol.c @@ -5025,9 +5025,6 @@ static ssize_t mem_cgroup_read(struct cg type = MEMFILE_TYPE(cft->private); name = MEMFILE_ATTR(cft->private); - if (!do_swap_account && type == _MEMSWAP) - return -EOPNOTSUPP; - switch (type) { case _MEM: if (name == RES_USAGE) @@ -5162,9 +5159,6 @@ static int mem_cgroup_write(struct cgrou type = MEMFILE_TYPE(cft->private); name = MEMFILE_ATTR(cft->private); - if (!do_swap_account && type == _MEMSWAP) - return -EOPNOTSUPP; - switch (name) { case RES_LIMIT: if (mem_cgroup_is_root(memcg)) { /* Can't set limit on root */ @@ -5241,9 +5235,6 @@ static int mem_cgroup_reset(struct cgrou type = MEMFILE_TYPE(event); name = MEMFILE_ATTR(event); - if (!do_swap_account && type == _MEMSWAP) - return -EOPNOTSUPP; - switch (name) { case RES_MAX_USAGE: if (type == _MEM) _ Patches currently in -mm which might be from mhocko@xxxxxxx are linux-next.patch mm-hugetlb-fix-total-hugetlbfs-pages-count-when-memory-overcommit-accouting.patch mm-zone_end_pfn-is-too-small.patch mm-show_mem-suppress-page-counts-in-non-blockable-contexts.patch rmap-recompute-pgoff-for-unmapping-huge-page.patch memcg-keep-prevs-css-alive-for-the-whole-mem_cgroup_iter.patch memcg-rework-mem_cgroup_iter-to-use-cgroup-iterators.patch memcg-relax-memcg-iter-caching.patch memcg-relax-memcg-iter-caching-checkpatch-fixes.patch memcg-simplify-mem_cgroup_iter.patch memcg-further-simplify-mem_cgroup_iter.patch cgroup-remove-css_get_next.patch mm-hugetlb-add-more-arch-defined-huge_pte-functions.patch memcg-do-not-check-for-do_swap_account-in-mem_cgroup_readwritereset.patch drop_caches-add-some-documentation-and-info-messsge.patch memcg-debugging-facility-to-access-dangling-memcgs.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