Message ID | 20200519214049.15179-1-guoqing.jiang@cloud.ionos.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=VgvJ=7B=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 7EEC11391 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 19 May 2020 21:41:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A70E20DD4 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 19 May 2020 21:41:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="dMU1FC1+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A70E20DD4 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 3AD1A8001A; Tue, 19 May 2020 17:41:27 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 35D62900003; Tue, 19 May 2020 17:41:27 -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 2743E8001A; Tue, 19 May 2020 17:41:27 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 0B6F4900003 for <linux-mm@kvack.org>; Tue, 19 May 2020 17:41:27 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 870A8181AEF21 for <linux-mm@kvack.org>; Tue, 19 May 2020 21:41:26 +0000 (UTC) X-FDA: 76834790172.23.sleep46_46bf48fda8a55 X-Spam-Summary: 2,0,0,b144ce55593db352,d41d8cd98f00b204,guoqing.jiang@cloud.ionos.com,,RULES_HIT:41:355:379:541:960:973:988:989:1260:1345:1359:1437:1534:1540:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3350:3865:3867:4321:5007:6261:6653:7903:8660:8957:10004:11026:11232:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:13069:13148:13230:13311:13357:14096:14181:14384:14394:14721:21080:21212:21444:21451:21627:30012:30054:30070,0,RBL:209.85.218.68:@cloud.ionos.com:.lbl8.mailshell.net-66.201.201.201 62.14.0.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:23,LUA_SUMMARY:none X-HE-Tag: sleep46_46bf48fda8a55 X-Filterd-Recvd-Size: 3718 Received: from mail-ej1-f68.google.com (mail-ej1-f68.google.com [209.85.218.68]) by imf38.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Tue, 19 May 2020 21:41:26 +0000 (UTC) Received: by mail-ej1-f68.google.com with SMTP id z5so774517ejb.3 for <linux-mm@kvack.org>; Tue, 19 May 2020 14:41:25 -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=8pHDt6TZphRZyh659OaqVb1mgoicXJZH6YOE21j5ScM=; b=dMU1FC1+X+LgzrzDd8puroJ2VjoLl1b7VWx3Oxtyt5RbuHUQTWTuQLJk4KiUdb4hch BOhMOsMa+J+rREOLJwUsj56zTOlxXC2WesxpqG32wtYHMXotR7Bxv6jTxRKbk8j03ZXt fUBFDifGQEMkYvtRxGSYJDBgtvJyWBw656MILr0ozZkvxB3NbFT+XkVBtn3nY+mpTsDH fkg3DmX9UVMYxBNBAT6Z5gxKSD2ZDXbMfEfN1B0N2FgeXBawY7+lPjO1Aqk6iJfuzwzM W55AKS+fNrxcGfJI+ritFN9TMTQ8FvEJPoGMPSkPKYNauuL6Yx4M9XmccEbkC26jlWNw RFUw== 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=8pHDt6TZphRZyh659OaqVb1mgoicXJZH6YOE21j5ScM=; b=NeUNVnpz/o7HClg4ItADNG6kEGoZjXFqr4nFALaOLzGvzSRs+BNMqT3QHO8yp3YrMY eibKC4CVm0rv7ikZLXcWb+oVz4kmtsCOnpLJsWJR6RIUk735m6rgltddpuwKH4dSsgPi rDVs9+tNaoUXuLJyFHBulmhEeTpbgyBMrP87BIEbZYDjtsLHTO0REnnmU9WcvmihH5N6 K2uQ40GM9Lt7BOL3fZhR+S+ZYsSwJKsIAthmePD02CggOT1AeZxcfwjyoYgeC4pifloC GWl11rOa9awiLuQZTELhWWPodLNDWcFho1Glgsb6vm1XOoMW3qQmYhavU+7kRMerE70R BiLg== X-Gm-Message-State: AOAM533caFdp2qVyAABH9tVNXGNEmvogo4FqQq8wOcmFNu24e3rI2ca8 Kz4jL/MOjFLcnooJYyB2aYSNiw== X-Google-Smtp-Source: ABdhPJzwziXIgJV3keA3OENqJBxwLFq+cjMJNMlZTNY3H5m85XcQYW/VSr4fcseQdwsGI40fWd9+NQ== X-Received: by 2002:a17:906:f53:: with SMTP id h19mr1065446ejj.343.1589924484583; Tue, 19 May 2020 14:41:24 -0700 (PDT) Received: from ls00508.pb.local ([2001:1438:4010:2540:61fc:84a0:6c2a:7c97]) by smtp.gmail.com with ESMTPSA id j17sm337728ejs.108.2020.05.19.14.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 14:41:24 -0700 (PDT) From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com> To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, david@fromorbit.com, hch@infradead.org, willy@infradead.org, Guoqing Jiang <guoqing.jiang@cloud.ionos.com> Subject: [UPDATE PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code Date: Tue, 19 May 2020 23:40:49 +0200 Message-Id: <20200519214049.15179-1-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200517214718.468-1-guoqing.jiang@cloud.ionos.com> References: <20200517214718.468-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 |
None
|
expand
|
diff --git a/mm/migrate.c b/mm/migrate.c index 7160c1556f79..44546d407e40 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, (unsigned long)detach_page_private(page)); get_page(newpage); bh = head;
We can cleanup code a little by call detach_page_private here. Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com> --- Add the cast to fix type mismatch warning, sorry for the mistake. mm/migrate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)