[Devel] [PATCH RHEL7] mm: Fixing rwsem_is_contented conditional code in shrink_slab_memcg

Valeriy Vdovin valeriy.vdovin at virtuozzo.com
Fri Aug 21 14:08:44 MSK 2020


Fixes commit 38afbd5ecdd6841b5e486e3c9dae05d961f084b5 that partially
reverts code in shrink_slab_memcg by adding missing line.

https://jira.sw.ru/browse/PSBM-99181

Signed-off-by: Valeriy Vdovin <valeriy.vdovin at virtuozzo.com>
---
 mm/vmscan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4fa86e7..13ae9bd 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -598,6 +598,7 @@ static unsigned long shrink_slab_memcg(gfp_t gfp_mask, int nid,
 			map = memcg_nid_shrinker_map(memcg, nid);
 			nr_max = min(shrinker_nr_max, map->nr_max);
 		} else if (rwsem_is_contended(&shrinker_rwsem)) {
+			freed = freed ? : 1;
 			break;
 		}
 	}
-- 
1.8.3.1



More information about the Devel mailing list