[2/4] rmap: fix typo in folio_add_file_rmap_range()

Message ID 20230530080731.1462122-3-fengwei.yin@intel.com
State New
Headers
Series New page table range API fixup patches |

Commit Message

Yin Fengwei May 30, 2023, 8:07 a.m. UTC
  The "first" should be used to compare with COMPOUND_MAPPED
instead of "nr".

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
---
 mm/rmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/mm/rmap.c b/mm/rmap.c
index ec52d7f264aa..b352c14da16c 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1330,7 +1330,7 @@  void folio_add_file_rmap_range(struct folio *folio, struct page *page,
 			first = atomic_inc_and_test(&page->_mapcount);
 			if (first && folio_test_large(folio)) {
 				first = atomic_inc_return_relaxed(mapped);
-				first = (nr < COMPOUND_MAPPED);
+				first = (first < COMPOUND_MAPPED);
 			}
 
 			if (first)