[Devel] [PATCH rh7 4.1/8] ms/mm/rmap: share the i_mmap_rwsem fix

2020-12-01 Thread Andrey Ryabinin
Use down_read_nested to avoid lockdep complain.

Signed-off-by: Andrey Ryabinin 
---
 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(>i_mmap_rwsem, SINGLE_DEPTH_NESTING);
vma_interval_tree_foreach(vma, >i_mmap, pgoff, pgoff) {
unsigned long address = vma_address(page, vma);
 
-- 
2.26.2

___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel


[Devel] [PATCH rh7 4.1/8] ms/mm/rmap: share the i_mmap_rwsem fix

2020-12-01 Thread Andrey Ryabinin
Use down_read_nested to avoid lockdep complain.

Signed-off-by: Andrey Ryabinin 
---
 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(>i_mmap_rwsem, SINGLE_DEPTH_NESTING);
vma_interval_tree_foreach(vma, >i_mmap, pgoff, pgoff) {
unsigned long address = vma_address(page, vma);
 
-- 
2.26.2

___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel