diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-02-01 04:25:17 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-01 04:25:17 +0300 |
commit | 5ab0fc155dc0cac3b74584f7bc972569b0f8a57b (patch) | |
tree | fb43458b715be3a72c872bc4ce0e7c45e6f76ccb /include/linux/memcontrol.h | |
parent | 9a3f21fe5cb9f5654ccad7ba712d868f7de66e39 (diff) | |
parent | ac86f547ca1002aec2ef66b9e64d03f45bbbfbb9 (diff) | |
download | linux-5ab0fc155dc0cac3b74584f7bc972569b0f8a57b.tar.xz |
Sync mm-stable with mm-hotfixes-stable to pick up dependent patches
Merge branch 'mm-hotfixes-stable' into mm-stable
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 26667bf16da5..e605fc885f08 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1688,10 +1688,13 @@ void mem_cgroup_track_foreign_dirty_slowpath(struct folio *folio, static inline void mem_cgroup_track_foreign_dirty(struct folio *folio, struct bdi_writeback *wb) { + struct mem_cgroup *memcg; + if (mem_cgroup_disabled()) return; - if (unlikely(&folio_memcg(folio)->css != wb->memcg_css)) + memcg = folio_memcg(folio); + if (unlikely(memcg && &memcg->css != wb->memcg_css)) mem_cgroup_track_foreign_dirty_slowpath(folio, wb); } |