lkml.org 
[lkml]   [2023]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 11/18] mm: memory: use mm_counter_file_folio() in wp_page_copy()
    Date
    Use mm_counter_file_folio() to save one compound_head() call.

    Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
    ---
    mm/memory.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/mm/memory.c b/mm/memory.c
    index d35ca499bf1c..661c649afc22 100644
    --- a/mm/memory.c
    +++ b/mm/memory.c
    @@ -3158,7 +3158,7 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf)
    if (likely(vmf->pte && pte_same(ptep_get(vmf->pte), vmf->orig_pte))) {
    if (old_folio) {
    if (!folio_test_anon(old_folio)) {
    - dec_mm_counter(mm, mm_counter_file(&old_folio->page));
    + dec_mm_counter(mm, mm_counter_file_folio(old_folio));
    inc_mm_counter(mm, MM_ANONPAGES);
    }
    } else {
    --
    2.27.0
    \
     
     \ /
      Last update: 2023-11-20 13:47    [W:3.499 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site