Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp590181ybt; Fri, 26 Jun 2020 06:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa44BHLvkAWzpdO2RHwJR7HiwqFuZA+YBzTQg4uKvHeWOZS9ckfINg0tAfPKmKkpgAblvh X-Received: by 2002:a05:6402:2065:: with SMTP id bd5mr474071edb.67.1593179783265; Fri, 26 Jun 2020 06:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593179783; cv=none; d=google.com; s=arc-20160816; b=E7k9Qj98p665r5ddK4XnT2EfSeNPMuOA5384cArhkaght6ZTAkK8BvBZjPOyWTgqeE jcTpEIJG3JsC6R/cGYIov3IzTwlqLQ1RHCOY/lQKK5KkMEnsUopPhlSlgYVM9jEuG7DR G3rdQ+nv7OXcfnX5sf0VdpJQ/GpGKeILJguQvp4Hx9l+LwaPCIjGGh+kd7l7TRqLkk7Q Q/kWEae69s+ukMY+I7ekG/TDHGans9+XCQmbkr5tzfMyFjGmHyFr6dhs/2gmevDKNdpA /UAIY3DDLYhI6eAkJ2bNtmLcDspjh8m4lxgB97Y7tx1dZ50hPVDQ1JLg+DoXqgenIzVn F9Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZnIs+QJLTirmnt1BgF5CWwlHWzag4gTw+lRSPeEC4Ug=; b=aEQwKn4LC2lWPwODXfdAj6SPWVfXuSMTGOU9Bw63Y1OTxwShZK/Gk5url9kQrZ86gr dTo71lQLOPEiqCRR5KKkqXmqPMm7ZsptXL7qvXaNLq7eylhflkYlQLPImNE4FLd6i6in b/qeagAVbQGMT77RVB/cg7RprFBnIqWvF/yFSpZ6GJ/504UN71L3PteuOxmoKMeFJJJV ertLo5o5KfwyBdFGp+v3WxyMPGgbenM+Q7U47PjG9L6RMuIbWSvU8aVwcbWNiDT5/5wr gTr665OeGzHZYDXGFoUuYFKPJPAnBy0oBNCKZ5ZvKSJUCwFlvjJ18cUbd1myG05ZGhAi c/Pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si4306136eje.309.2020.06.26.06.55.59; Fri, 26 Jun 2020 06:56:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728970AbgFZNwg (ORCPT + 99 others); Fri, 26 Jun 2020 09:52:36 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:33093 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728938AbgFZNwf (ORCPT ); Fri, 26 Jun 2020 09:52:35 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R471e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0U0lTVpj_1593179550; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U0lTVpj_1593179550) by smtp.aliyun-inc.com(127.0.0.1); Fri, 26 Jun 2020 21:52:30 +0800 From: Wei Yang To: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, yang.shi@linux.alibaba.com, vbabka@suse.cz, willy@infradead.org, thomas_os@shipmail.org, thellstrom@vmware.com, anshuman.khandual@arm.com, sean.j.christopherson@intel.com, aneesh.kumar@linux.ibm.com, peterx@redhat.com, walken@google.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, digetx@gmail.com, Wei Yang Subject: [RESEND Patch v2 1/4] mm/mremap: format the check in move_normal_pmd() same as move_huge_pmd() Date: Fri, 26 Jun 2020 21:52:13 +0800 Message-Id: <20200626135216.24314-2-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20200626135216.24314-1-richard.weiyang@linux.alibaba.com> References: <20200626135216.24314-1-richard.weiyang@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No functional change, just improve the readability and prepare for following cleanup. Signed-off-by: Wei Yang Tested-by: Dmitry Osipenko --- mm/mremap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/mremap.c b/mm/mremap.c index 5dd572d57ca9..97bf9a2a8bd5 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -200,8 +200,9 @@ static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr, struct mm_struct *mm = vma->vm_mm; pmd_t pmd; - if ((old_addr & ~PMD_MASK) || (new_addr & ~PMD_MASK) - || old_end - old_addr < PMD_SIZE) + if ((old_addr & ~PMD_MASK) || + (new_addr & ~PMD_MASK) || + old_end - old_addr < PMD_SIZE) return false; /* -- 2.20.1 (Apple Git-117)