From patchwork Mon Apr 20 02:28:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenqiwu X-Patchwork-Id: 11498017 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 50E3892C for ; Mon, 20 Apr 2020 02:28:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 18B532145D for ; Mon, 20 Apr 2020 02:28:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ETWFyWuH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18B532145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 24F418E0005; Sun, 19 Apr 2020 22:28:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1FF5D8E0003; Sun, 19 Apr 2020 22:28:17 -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 116FF8E0005; Sun, 19 Apr 2020 22:28:17 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id F15158E0003 for ; Sun, 19 Apr 2020 22:28:16 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AE71D4DBF for ; Mon, 20 Apr 2020 02:28:16 +0000 (UTC) X-FDA: 76726648992.12.whip37_6558cc97a743d X-Spam-Summary: 2,0,0,b040c57ed55a95fe,d41d8cd98f00b204,qiwuchen55@gmail.com,,RULES_HIT:41:355:379:541:800:960:968:973:988:989:1260:1345:1437:1534:1539:1711:1714:1730:1747:1777:1792:2393:2559:2562:2895:3138:3139:3140:3141:3142:3350:3865:3867:3868:3870:3872:4321:5007:6261:6653:7576:7875:9413:10004:11026:11232:11473:11658:11914:12296:12297:12438:12517:12519:12555:12679:12895:12986:13069:13095:13161:13229:13311:13357:14181:14384:14394:14721:21080:21433:21444:21451:21611:21627:21666:30054:30070,0,RBL:209.85.216.65:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.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: whip37_6558cc97a743d X-Filterd-Recvd-Size: 3334 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Apr 2020 02:28:16 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id a7so3563298pju.2 for ; Sun, 19 Apr 2020 19:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qx4HPhuVjEJWvqXIoxDGKnbGannlHDgY92ZNPO57E64=; b=ETWFyWuHjVdkJeM3ae4Oy/vWZvDKKtVcWS7LlVROYYMPInUHZtE7IgszTnyJdaawrh GPDX9isjD95zE8uUFgjNnR26kjKKT6P1iuZqgl3LQopq/lzQ8EVYWDmDBWPOlKVLFQ9/ 0vMOY4ATZB1Dq/0PVMKS6K0tbtaJJ5oNjEVa0vvycUxFbD/namYz2LdjinJfgnv8lM8Q u/gYBhVxUDt77aW3VUOdAu74KvEqukkhsQjZEZbO+MAkW8k2PsIFN1tBX8qpOzmAl7xA n5NOazvBC3qN5IjeK8R4FHkiJ/R5ZeQDhnhoIWCuFufDbsMtfJavS6bOK8C3ei+YjScU 57Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qx4HPhuVjEJWvqXIoxDGKnbGannlHDgY92ZNPO57E64=; b=umnYPETw5bswhlERfdAxhkaH4eKl+fMnfgZSlDhzZSIzM+Tdfdk5N0MXWbFaOKT2b1 iBR4ER7TWPcvsF4Npi3/Lqx9APPev/HaWY60dNQuNU5o5FeRPRsCcb27ABe14DKawAai anPI11lhLt0E207x6cV1zAeZsMkwbddZF8d36mbF25no/QUf6BmSwkKRkrK8oT8O5KBR kGyoL4TDEEWO0O+iFgry5+QZ606mnCge4rvBOol6/PNEzQggGBnzeXnwi64i7Rwmr3Aw S/4objuznRvSds9t0I8u/UcF4AXcwY7wjoxz3IwQy+rVIqWWpzF8LwcCwLAzrHVtgtc5 YLlw== X-Gm-Message-State: AGi0PuaLQah6Tvcx88b69LW50swW4FvdmxFb9MIstjl0i4znwYCAJiNx Up5XCBmob1ABM7JWDaw59vo= X-Google-Smtp-Source: APiQypIBmKArdz6Oy3P3DeBFjfRFCEWC+i5epGggl6/8/qf8Cijw1c/sYjO57wTWHhB55zrTSIUoNQ== X-Received: by 2002:a17:902:8509:: with SMTP id bj9mr15295014plb.64.1587349695373; Sun, 19 Apr 2020 19:28:15 -0700 (PDT) Received: from localhost ([43.224.245.179]) by smtp.gmail.com with ESMTPSA id z6sm24147591pgg.39.2020.04.19.19.28.14 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 19 Apr 2020 19:28:14 -0700 (PDT) From: qiwuchen55@gmail.com To: akpm@linux-foundation.org, willy@infradead.org Cc: linux-mm@kvack.org, chenqiwu Subject: [PATCH v2] mm/memory: remove unnecessary pte_devmap case in copy_one_pte() Date: Mon, 20 Apr 2020 10:28:05 +0800 Message-Id: <1587349685-31712-1-git-send-email-qiwuchen55@gmail.com> X-Mailer: git-send-email 1.9.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000523, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: chenqiwu Since commit 25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support"), the assignment to 'page' for pte_devmap case has been unnecessary. Let's remove it. Signed-off-by: chenqiwu Acked-by: Michal Hocko --- Change in v2: - According to Matthew's suggestion, update commit title and message. mm/memory.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index f703fe8..2143827 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -802,8 +802,6 @@ struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr, get_page(page); page_dup_rmap(page, false); rss[mm_counter(page)]++; - } else if (pte_devmap(pte)) { - page = pte_page(pte); } out_set_pte: