Message ID | 20200507214400.15785-11-guoqing.jiang@cloud.ionos.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=UvJ8=6V=kvack.org=owner-linux-mm@kernel.org> 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 93D0C912 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 7 May 2020 21:44:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6169C208E4 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 7 May 2020 21:44:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="dkeBq94O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6169C208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=cloud.ionos.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6B23A900004; Thu, 7 May 2020 17:44:30 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 66330900002; Thu, 7 May 2020 17:44:30 -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 5A084900004; Thu, 7 May 2020 17:44:30 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id 41E55900002 for <linux-mm@kvack.org>; Thu, 7 May 2020 17:44:30 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EC0DF10F23 for <linux-mm@kvack.org>; Thu, 7 May 2020 21:44:29 +0000 (UTC) X-FDA: 76791252258.10.death65_7e8dbbc584639 X-Spam-Summary: 2,0,0,a58f8f537057ebed,d41d8cd98f00b204,guoqing.jiang@cloud.ionos.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1359:1431:1437:1534:1540:1568:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3876:3877:4321:5007:6114:6119:6120:6261:6642:6653:7903:8660:8957:10004:11026:11232:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:13069:13148:13230:13311:13357:13846:14096:14181:14384:14721:21080:21212:21444:21451:21627:30012:30054,0,RBL:209.85.218.52:@cloud.ionos.com:.lbl8.mailshell.net-66.100.201.201 62.2.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: death65_7e8dbbc584639 X-Filterd-Recvd-Size: 3783 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by imf31.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Thu, 7 May 2020 21:44:29 +0000 (UTC) Received: by mail-ej1-f52.google.com with SMTP id q8so5911445eja.2 for <linux-mm@kvack.org>; Thu, 07 May 2020 14:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p3qBa9K9MbgLEfhWUqlAktM7PPXv8tgud53nGFCyYG0=; b=dkeBq94OBb3NF7kVoAbkVx2HSO3CU2chuvwHNFGEWXV0yhNdXxm/WFjxCC0MkuBwOQ ukTQVmH3uUPgYCweOd1LQwPUAiwXSwuEHHA3DGaAzdHCj7mD6A77knGTR2DbyLLaoMmr P9/xT7V4BL2slYRI2haV4GFVTBcxtTPf1JtlHWg9BSOm7kTAMgWRJ5oRuiN5qcHOOlyX BNtTA6Fe24s8s4Oa3ZVX5xjq6Kj2yZ8P5YLEXdWpAx+lfEA+3pPnLlKxThXhKsFv5fWe zkNndfIoksb9SEG4OkxblR24QSkvS1+qVaCorcEY8RlAtYD1QYFhXRzyfiZlmBPsE72S mwbg== 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:in-reply-to :references; bh=p3qBa9K9MbgLEfhWUqlAktM7PPXv8tgud53nGFCyYG0=; b=XBpqIGQ7bX8v3EMIVZRkeyVHrVbWokfNBj4uJ41LRJ8VU/OZEVEchUtKBzcwOiqRQC wmW1toONRyVT6/INK9OMCRPonDr2P8Wgh6B3EW+/C9fZ22e+698UZWuhaAJI8wVO1p2X cLFMtNLAhsdK2dUpHjQnOQnS9XMPTe6NpbFaoRyjzNkIP7Z/EwR33YT+YVwTg49cfFPe iZNhpF6QbKmUqS0PkcMmHNys1Ul7wwblk7nJXEGtXAXllERaz2kFTHk3bQzRthOF0uzj 1Zdi3xv7d7fFob8XaQlSPQIGxxki6MrGmW7KYWBGwuBcZMe4NjVEdv5sG4QAYK8m/Ip+ ngmg== X-Gm-Message-State: AGi0PuawfFzw8pVyhAmrT7W0fct7FHoKynaxQTzkZHyeYGHB4Q2wE+fJ d851Mk+TadrKMeJr1uoHoDiq6w== X-Google-Smtp-Source: APiQypIynmIlSHyf+k65C+y42oKo8PLrA1c4S7WEkoE13fKDpP+OJZwLHdb5GIwza40Y5+tp0xnxFQ== X-Received: by 2002:a17:906:a857:: with SMTP id dx23mr14469278ejb.52.1588887868069; Thu, 07 May 2020 14:44:28 -0700 (PDT) Received: from ls00508.pb.local ([2001:1438:4010:2540:a1ee:a39a:b93a:c084]) by smtp.gmail.com with ESMTPSA id k3sm613530edi.60.2020.05.07.14.44.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 14:44:27 -0700 (PDT) From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com> To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: david@fromorbit.com, hch@infradead.org, willy@infradead.org, Guoqing Jiang <guoqing.jiang@cloud.ionos.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org Subject: [RFC PATCH V3 10/10] mm/migrate.c: call detach_page_private to cleanup code Date: Thu, 7 May 2020 23:44:00 +0200 Message-Id: <20200507214400.15785-11-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507214400.15785-1-guoqing.jiang@cloud.ionos.com> References: <20200507214400.15785-1-guoqing.jiang@cloud.ionos.com> 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: <linux-mm.kvack.org> |
Series |
[RFC,V3,01/10] include/linux/pagemap.h: introduce attach/detach_page_private
|
expand
|
diff --git a/mm/migrate.c b/mm/migrate.c index 7160c1556f79..f214adfb3fa4 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -797,10 +797,7 @@ static int __buffer_migrate_page(struct address_space *mapping, if (rc != MIGRATEPAGE_SUCCESS) goto unlock_buffers; - ClearPagePrivate(page); - set_page_private(newpage, page_private(page)); - set_page_private(page, 0); - put_page(page); + set_page_private(newpage, detach_page_private(page)); get_page(newpage); bh = head;
We can cleanup code a little by call detach_page_private here. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com> --- Added since RFC V3. mm/migrate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)