Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp219098ybl; Tue, 13 Aug 2019 19:21:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxE3BHfkBK4VvE9WUJepPGhLXDa0BSi9eOSvwn8bBDsAc7FzR+Qmcupdfc3sAOIvG8MGwnN X-Received: by 2002:a17:90a:1a45:: with SMTP id 5mr5070793pjl.43.1565749276029; Tue, 13 Aug 2019 19:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565749276; cv=none; d=google.com; s=arc-20160816; b=IMLGODtAtkWOL1IwDxAKa250G3ZmG9KE09TJyx/I1a9TGQ4LE5lqDfNqMhgx3b9/ge /TmMGUVNj9TN1CIck7wK72oFPyis2tkhpFJ3sR8OlRu/hdI0wujUZVWCDQ4P824Lac4Y zRdtwyBKffJ7tF2Ua1dYu+jfu8OWeeUG9CzteU5HCPihNrF6Lk30AFNll2awS3y+91kG PSJ3Kx48TmuAiJkEWyxked3fxDpXnVJDFrbIc4h34YBvLkapTOcNIa/b3L1szw7jVOa0 aXOIbvlmXP2iJLJcEliF5CRUYA2JkO0OOXGVDyRmnWP1ynKxeN9cLltnZZ1qkAbqo9JH ZFGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=yB4n1bHpOz3zvRsO0po33gznAOEd0k0FHrelg0TAOwA=; b=b0G2FjTMgHbyqZdj+4Wr3fwaArTaqxKo0lgN4JtvOtLiJmfxhWyRCjQwnT9dJv9NLh MDvNdDEk3H63l/GdpszLGp+qK9saD2/1qGjXPjmj9df5HH4aPAOS+dvcfdSwc+uMDpmr gluHNS6MPSMmiOhOIBeDlFjcWzJNgyWbeSrScIy4zydBjON8L0733Csn7U6LVjL0Z/Ql ucjCUgMVkkDHlzKqifLSjSi9t67U0UIkyjfOKOoNDQWZnsr1TBBVsHZ69cY8xL/uyQhp Qmef+x/yjlUXSudHYrvm57mMXzuQEIYKO9AJNOKYEtVikqcAF7hP/o1MqvYWSCtmPfBH s46A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c18si1960446pjo.105.2019.08.13.19.21.00; Tue, 13 Aug 2019 19:21:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728771AbfHNCSY (ORCPT + 99 others); Tue, 13 Aug 2019 22:18:24 -0400 Received: from mga12.intel.com ([192.55.52.136]:4431 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728388AbfHNCSX (ORCPT ); Tue, 13 Aug 2019 22:18:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2019 19:18:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,382,1559545200"; d="scan'208";a="181365545" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga006.jf.intel.com with ESMTP; 13 Aug 2019 19:18:21 -0700 From: Wei Yang To: akpm@linux-foundation.org, mgorman@techsingularity.net, vbabka@suse.cz, osalvador@suse.de Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH 2/3] mm/mmap.c: __vma_unlink_prev is not necessary now Date: Wed, 14 Aug 2019 10:17:54 +0800 Message-Id: <20190814021755.1977-2-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190814021755.1977-1-richardw.yang@linux.intel.com> References: <20190814021755.1977-1-richardw.yang@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The third parameter of __vma_unlink_common could differentiate these two types. __vma_unlink_prev is not necessary now. Signed-off-by: Wei Yang --- mm/mmap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 3d56340fea36..3fde0ec18554 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -693,13 +693,6 @@ static __always_inline void __vma_unlink_common(struct mm_struct *mm, vmacache_invalidate(mm); } -static inline void __vma_unlink_prev(struct mm_struct *mm, - struct vm_area_struct *vma, - struct vm_area_struct *prev) -{ - __vma_unlink_common(mm, vma, vma); -} - /* * We cannot adjust vm_start, vm_end, vm_pgoff fields of a vma that * is already present in an i_mmap tree without adjusting the tree. @@ -874,7 +867,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, * us to remove next before dropping the locks. */ if (remove_next != 3) - __vma_unlink_prev(mm, next, vma); + __vma_unlink_common(mm, next, next); else /* * vma is not before next if they've been -- 2.17.1