[Devel] [PATCH rh7 4.1/8] ms/mm/rmap: share the i_mmap_rwsem fix
Andrey Ryabinin
aryabinin at virtuozzo.com
Tue Dec 1 14:06:28 MSK 2020
Use down_read_nested to avoid lockdep complain.
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
mm/rmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index 523957450d20..90cf61e209ac 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1724,7 +1724,7 @@ static int rmap_walk_file(struct page *page, struct rmap_walk_control *rwc)
return ret;
pgoff = page_to_pgoff(page);
- i_mmap_lock_read(mapping);
+ down_read_nested(&mapping->i_mmap_rwsem, SINGLE_DEPTH_NESTING);
vma_interval_tree_foreach(vma, &mapping->i_mmap, pgoff, pgoff) {
unsigned long address = vma_address(page, vma);
--
2.26.2
More information about the Devel
mailing list