From patchwork Tue Aug 18 08:46:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Yanfei" X-Patchwork-Id: 11720355 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F4E51392 for ; Tue, 18 Aug 2020 08:46:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 137E82075E for ; Tue, 18 Aug 2020 08:46:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 137E82075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=windriver.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4A9E96B000E; Tue, 18 Aug 2020 04:46:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 459A46B0010; Tue, 18 Aug 2020 04:46:33 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 349EE6B0023; Tue, 18 Aug 2020 04:46:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id 199B06B000E for ; Tue, 18 Aug 2020 04:46:33 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C976D180AD838 for ; Tue, 18 Aug 2020 08:46:32 +0000 (UTC) X-FDA: 77163058224.13.wheel93_3f007b52701e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 9D70818140B60 for ; Tue, 18 Aug 2020 08:46:32 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,yanfei.xu@windriver.com,,RULES_HIT:30012:30054,0,RBL:147.11.1.11:@windriver.com:.lbl8.mailshell.net-62.18.0.75 64.10.201.10;04yrqaecmn4rripnjetfsign5kxrwopb737rwysfy1jmqmruurhyxpmz7kcnit3.oob7z8osf8pb3ukougqssrjj6j17y73xztihz57e8397espartmhc5onb1bo6sk.k-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: wheel93_3f007b52701e X-Filterd-Recvd-Size: 1808 Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Tue, 18 Aug 2020 08:46:31 +0000 (UTC) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail.windriver.com (8.15.2/8.15.2) with ESMTPS id 07I8kSaT020265 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 18 Aug 2020 01:46:28 -0700 (PDT) Received: from pek-lpggp1.wrs.com (128.224.153.74) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.487.0; Tue, 18 Aug 2020 01:46:09 -0700 From: To: CC: , Subject: [PATCH] mm/memory.c: Replace vmf->vma with variable vma Date: Tue, 18 Aug 2020 16:46:07 +0800 Message-ID: <20200818084607.37616-1-yanfei.xu@windriver.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 9D70818140B60 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Yanfei Xu The code has declared a vma_struct named vma which is assigned a value of vmf->vma. Thus, use variable vma directly here. Signed-off-by: Yanfei Xu Reviewed-by: Matthew Wilcox (Oracle) --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 9cc3d0dc816c..88f61b4f9638 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3454,7 +3454,7 @@ static vm_fault_t __do_fault(struct vm_fault *vmf) * # flush A, B to clear the writeback */ if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) { - vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm); + vmf->prealloc_pte = pte_alloc_one(vma->vm_mm); if (!vmf->prealloc_pte) return VM_FAULT_OOM; smp_wmb(); /* See comment in __pte_alloc() */