diff options
| author | Stephen Rothwell <sfr@canb.auug.org.au> | 2022-06-28 16:54:05 +1000 |
|---|---|---|
| committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2022-06-28 16:54:05 +1000 |
| commit | 5f9df76887bf8170e8844f1907c13fbbb30e9c36 (patch) | |
| tree | 3b940f7e1c36605af69ffe3a3e9bc8fa53bd12a1 /mm/page_io.c | |
| parent | 8f850ad6cf932b8b5125f9585cb397e08403cccd (diff) | |
| parent | 84b494dcbcc015419e629ced664d3b737e83336e (diff) | |
| download | linux-next-akpm.tar.gz linux-next-akpm.zip | |
# Conflicts:
# include/linux/pagevec.h
Diffstat (limited to 'mm/page_io.c')
| -rw-r--r-- | mm/page_io.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_io.c b/mm/page_io.c index 68318134dc92..f75ebbc95ee6 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -222,13 +222,14 @@ static void bio_associate_blkg_from_page(struct bio *bio, struct page *page) struct cgroup_subsys_state *css; struct mem_cgroup *memcg; + rcu_read_lock(); memcg = page_memcg(page); if (!memcg) - return; + goto out; - rcu_read_lock(); css = cgroup_e_css(memcg->css.cgroup, &io_cgrp_subsys); bio_associate_blkg_from_css(bio, css); +out: rcu_read_unlock(); } #else |
